[Rails] Saving parent record before child

2009-04-17 Thread josh.rach...@gmail.com
I am on Rails 2.2 and want to save an artist object with a child attribute called artist_mood_concepts. I can update fine but when I do an @artist.save, it gives me an error about saving the parent before the child (which makes perfect sense). What is the easiest way to solve the problem? after

[Rails] Unknown Action error while updating record

2009-04-15 Thread josh.rach...@gmail.com
I understand other people have had trouble using :action => 'update' with form_tag... but I haven't figured it out yet... here is my declaration of the form: <% form_tag :action => 'update', :html => {:method => "put"} do %> I tried just using <% form_tag :action => 'update' % do>, along with ot

[Rails] Re: rails + validations -- place them in application.rb?

2009-04-07 Thread josh.rach...@gmail.com
"") return a.downcase end These are validations that need to be accessed from an admin tool and a crawler_controller... It just looks like adding to the active record validation.rb file might not be the right place. Maybe I'm wrong? On Apr 6, 12:42 pm, "

[Rails] rails + validations -- place them in application.rb?

2009-04-06 Thread josh.rach...@gmail.com
I need to put a set of validations in a place that can be accessed by multiple controllers... do I just place them in application.rb? Thanks, Josh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Tal

[Rails] datetime_select issues

2009-04-01 Thread josh.rach...@gmail.com
I tried using this to build a datetime text box area: select_datetime (date = Time.now, :order => [:year, :month, :day]) This just returns a hash will the year, month, day, hour, minute. I also tried using datetime_select to do the same thing, but cant figure out how to capture the value of the