search for: gsterndale

Displaying 4 results from an estimated 4 matches for "gsterndale".

2008 Jul 20
2
Filtering results through URL (e.g. new?forum_id=3)
Is there a special code you have to place in the routes so filtering results through the URL works? For example, Ruby Forum does it with: http://www.ruby-forum.com/topic/new?forum_id=3 http://www.ruby-forum.com/topic/new?forum_id=5 http://www.ruby-forum.com/topic/new?forum_id=7 etc. Any ideas? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You
2008 Nov 21
5
Getting the number of years between two dates
Hey, I need to get the number of years (as a number) between two dates. Here is what I have as a helper. # Returns the number of years between now and the specified date. def years_ago(date) dateDifference = DateTime.now - date results =Date.day_fraction_to_time(dateDifference) return results[0] / 24 / 365; end I''m sure there is a better way to do this. What is it?
2008 Jul 20
0
eager loading a named_scope
Hi, I''d like to eager load a named_scope like this: User.find(params[:id], :include => [:friends.married]) Any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To
2009 Mar 03
0
rake db:migrate not saving latest version #
Howdy, I''m having some trouble migrating. From a fresh db, rake db:migrate runs successfully, with no errors. The tasks in the latest migration are performed with no problem. However, the latest version # is not saved in the schema_migrations table. All other version numbers are. Subsequent rake db:migrate cause errors because columns/tables already exist. I''ve tried