Hi there! Currently im using date_select to select a day and month of the year. But i''m hiding the year since it is not important. But when i try to save to the database the controller complains that the year is missing. Can i set the year to for example Time.now.year in the model? date_select("timesheet", "date", :discard_year => true, :use_short_month => true) Best regards, Simon --~--~---------~--~----~------------~-------~--~----~ 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 unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Can you post the error message that you''re receiving? Steve --~--~---------~--~----~------------~-------~--~----~ 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 unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, it seems that date(1i) is missing and that is why i get the error. But i would like to set the year in the model and use create in the controller instead of new where i can manually set the year. ActiveRecord::MultiparameterAssignmentErrors in TimetrackController#create 1 error(s) on assignment of multiparameter attributes Request Parameters: {"commit"=>"Spara", "timesheet"=>{"time"=>"44", "bc_project_id"=>"855290", "date(2i)"=>"1", "date(3i)"=>"31", "description"=>"dfdfdf", "user_id"=>"1"}} On Jan 30, 9:20 pm, "Steve Bartholomew" <s...-LWB5c3/XHbdBDgjK7y7TUQ@public.gmane.org> wrote:> Can you post the error message that you''re receiving? > > Steve--~--~---------~--~----~------------~-------~--~----~ 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 unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---