Ruby on Rails »
Deep beginningTue, 20 Jul 2010 22:03:02 UT
Hey guys, it'll be kinda silly question, but I was working for two years on my bachelor's thesis using RoR...but I have never found out, how to do that when I type in the browser the address and port, there will be a homepage shown...is there some easy way? Thanks in advance Jan Kadera
Ruby on Rails - Google Maps book
Tue, 20 Jul 2010 22:22:55 UT
I'm looking at creating an application utilizing ROR and the Google Maps API. I came across this book "Beginning Google Maps Applications with Rails and Ajax: From Novice to Professional<[link]>". Would this title be to far out of date to even be useful?
Association record duplication
Wed, 21 Jul 2010 00:10:09 UT
I have an edit page that generates a few input fields I organized in a table, like so: <tr> <td>Driver License</td> <td> <input id="person_accounts_attributes _0_account_documents_attribute s_1_number" name="person[accounts_attribut es][0][account_documents_attri butes][1]
number_to_human_size
Wed, 21 Jul 2010 03:47:24 UT
Hi all. I have noticed some questionable behaviour when converting byte sizes into a human-readable form. $ruby scriptconsole Loading development environment (Rails 2.3.8) >> include ActionView::Helpers::NumberHel per => Object >> number_to_human_size(1000) => "1000 Bytes" # I wanted "1 kB"
is it safe to allow mass assignment of associations?
Wed, 21 Jul 2010 05:34:01 UT
Item belongs_to :user attr_accessible :user is this safe? Item.user_id is still protected, and Item.user can't be set by mass assignment from a web request because the parameters are all strings - trying to assign a string to Item.user raises AssociationTypeMismatch. Even setting params['item']['user'] to an
Gem for displaying international postal addresses?
Tue, 20 Jul 2010 22:14:55 UT
Is there a Gem that can be utilized for displaying postal addresses in the format specific to their destination country or region? Basically, a Gem that programatically does what this site advises? [link] Anything similar? Thanks!
Please help --> Getting error ERROR NoMethodError: private method `gsub!' called for #
Wed, 21 Jul 2010 06:39:29 UT
[2010-07-21 11:35:18] ERROR NoMethodError: private method `gsub!' called for #<Class:0x47a8e38> C:/Applns/Ruby187/lib/ruby/1.8 /webrick/htmlutils.rb:16:in `escape' C:/Applns/Ruby187/lib/ruby/1.8 /webrick/httpresponse.rb:232:i n `set_error' C:/Applns/Ruby187/lib/ruby/gem s/1.8/gems/rails-2.2.3/lib/
Ruby ORM and other tools for CUBRID Database System
Wed, 21 Jul 2010 07:07:20 UT
Hello, My name is Esen Sagynov. I am a developer and a project manager at CUBRID Database Development Team. First, let me briefly introduce CUBRID. It is an free open source relational database management system highly optimized for Web applications ([link]). We have developed the stable Drivers for JDBC and PHP. Recently the
= sign at end of plain text sent by mailer
Wed, 21 Jul 2010 11:57:06 UT
Rails v2.3.8; Ruby v1.8.7 When sending a plain text email using ActionMailer, the email contains = signs at the end of long lines. This is a problem as I'm including a link which is bound to break over more than one line and so the user will not be able to cut and past it into a browser. Can anybody tell me how to stop this behaviour please?
Rails rake - setting constant and cache delete
Wed, 21 Jul 2010 12:12:15 UT
i perform a rake task with a cron, in this task i have 2 problems: -i using a constant name setting in my config/environment.rb, when i try to run the rake job on the "environment developer" the constant is read an the job works fine, but when i try on the "environment production" the constant seem not include in the job.
Re: [Rails] Seeking Cofounder (aka ninja, rockstar, superman, etc)
Wed, 21 Jul 2010 12:14:54 UT
Hi Aaron, I'd be interested in hearing more about your idea. I'm currently employed as the lead developer for ShopKeep.com, a SaaS startup based in NYC. I telecommute from Fort Worth, Texas. The business side of my current situation isn't shaping up as I'd envisioned and so I've started looking for my next adventure.
IDs problem
Wed, 21 Jul 2010 15:14:23 UT
Hi, I have a model "Theme" which has_and_belongs_to_many "Lessons". I need to get the (db) id of the lessons through the theme. For instance, if in irb I write something like this : test = Theme.find(:first) puts test.lessons.first.id I get the ID of test (the theme) and not of the lesson. Do you know how to get the id of the nested object instead ?
produce html flash message with csv action
Wed, 21 Jul 2010 15:31:19 UT
How would I produce an HTML flash message on the screen if I call an action.csv in the page?
Creating new database
Wed, 21 Jul 2010 16:59:05 UT
I have a development db for my app and wanted to create a new development db. so, i created a new and changed the config files as needed. one but i can not do any new migrations. i tried rake db:reset and rake db:migrate:reset however it gives me the error that a certain table is not found. I can create the db with rake db:create. Do I need
Re: [Rails] Generating RDoc for App
Wed, 21 Jul 2010 17:53:03 UT
Even IDE s have problem with named_scopes. I don't think RDoc can recognize it. Besides looking like a train wreck, that's one of the reason I don't like named_scopes.
all custom helper modules being made available to all controllers without a call to helper?
Mon, 19 Jul 2010 21:30:00 UT
I have three different helper modules in my helpers directory (authentication_helper.rb... etc). In my views and partials I have calls to them but application_controller never directly calls the method #helper directly (as in helper AuthenticationHelper or helper :layout)... Shouldn't calls to those methods return a method not found error
many to many relations
Mon, 19 Jul 2010 20:59:35 UT
Hi everyone, I have a simple question: an author has a place of birth and a place of death. Both places should come from the same table (cities). This should be a many_to_many relationship, because one author may be born in the same city where the other author dies. Now in the authors-table, one city_id would not be enough, it has to
Rails 3 render partial
Mon, 19 Jul 2010 22:53:06 UT
The following rails 2.3.x code is not working in rails 3 beta 4: def render_crud_table(obj,controll er_name,columns,search_fields_ array,status_array,actions) render :partial => 'shared/crud_maint_table', :object => obj, :locals => {:controller_name => controller_name, :columns => columns, :search_fields_array => search_fields_array, :status_array =>
Association count sorting
Tue, 20 Jul 2010 02:22:19 UT
I have 3 models GrandPa, Pa, Kid GrandPa => has_many :pas Pa => has_many kids When I list GrandPa I would like to present the following ****************************** *************** 1 - GrandPa_Name 2 - List of Pas sorted by the number kids each pa has in descending order ****************************** ****************
Jruby or Ruby(1.9.1) with Rails for lots of Java Backends
Mon, 19 Jul 2010 23:25:35 UT
Hello, I'm working on a project that requires a lot of web triggered java applications. For instance, when a user click a search button, I call java from Rails to do the heavy weight. Is it troublesome to call java application from ruby(on rails)? Can Jruby simplify calling java application and, further more, will it give more flexibility with my



