What field type should I use to store time in oracle? I tried :time but that actually creates a date field that doesn''t work with time_select, it gives me the error "1 error(s) on assignment of multiparameter attributes". Thanks, -- Greg Donald Cyberfusion Consulting http://cyberfusionconsulting.com/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Greg Donald wrote:> What field type should I use to store time in oracle? I tried :time but > that actually creates a date field that doesn''t work with time_select, > it gives me the error "1 error(s) on assignment of multiparameter > attributes". > > > Thanks, > > > -- > Greg Donald > Cyberfusion Consulting > http://cyberfusionconsulting.com/i hope someone answers....i''ve got my oracle birthdate column defined as Date if that helps plus here something i''ve found...<%= Time.now.to_s(:db) %> interesting that it adds a another parameter to String class .to_s (to string method) using the :db (unknown?)....dave -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Mon, 1 Oct 2007, Dave Rose wrote:> Greg Donald wrote: > > What field type should I use to store time in oracle? I tried :time but > > that actually creates a date field that doesn''t work with time_select, > > it gives me the error "1 error(s) on assignment of multiparameter > > attributes". > > i hope someone answers....i''ve got my oracle birthdate column defined as > Date if that helps plus here something i''ve found...<%> Time.now.to_s(:db) %> interesting that it adds a another parameter to > String class .to_s (to string method) using the :db (unknown?)....daveI ended up using an oracle ''date'' field even though I only need to store a time, seems there''s really no other choice. You can''t use a string type if you want to use any rails helpers. And then even using the oracle date field the time_select helper won''t work with it. I''m having to use the select_datetime helper for now. The weird thing about the oracle date field is the oracle web interface only shows me the date. I have to query using to_char( meds, ''hh:mi'' ) to be able to see the time portion, the part I need to actually see. -- Greg Donald Cyberfusion Consulting http://cyberfusionconsulting.com/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> I ended up using an oracle ''date'' field even though I only need to store > a time, seems there''s really no other choice. You can''t use a string > type > if you want to use any rails helpers. And then even using the oracle > date > field the time_select helper won''t work with it. I''m having to use the > select_datetime helper for now. > > The weird thing about the oracle date field is the oracle web interface > only shows me the date. I have to query using to_char( meds, ''hh:mi'' ) > to be able to see the time portion, the part I need to actually see. > > > -- > Greg Donald > Cyberfusion Consulting > http://cyberfusionconsulting.com/..could you help me... i''m using this: <div class="form_row"> <label for="birthdate">Birthdate:</label> <%= date_select :spec, :birthdate, :start_year => Spec::START_YEAR, :end_year => Time.now.year, :include_blank => true, :order => [:year, :month, :day] %> </div> and i still am getting an active record error ActiveRecord::MultiparameterAssignmentErrors in SpecController#edit 1 error(s) on assignment of multiparameter attributes ....dave -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Tue, 2 Oct 2007, Dave Rose wrote:> ..could you help me... i''m using this: > <div class="form_row"> > <label for="birthdate">Birthdate:</label> > <%= date_select :spec, :birthdate, > :start_year => Spec::START_YEAR, > :end_year => Time.now.year, > :include_blank => true, > :order => [:year, :month, :day] %> > </div> > and i still am getting an active record error > ActiveRecord::MultiparameterAssignmentErrors in SpecController#edit > > 1 error(s) on assignment of multiparameter attributes ....daveYou might try wrapping the options in {} so date_select doesn''t get confused. Or maybe try using the form_for syntax. -- Greg Donald Cyberfusion Consulting http://cyberfusionconsulting.com/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Greg Donald wrote:> On Tue, 2 Oct 2007, Dave Rose wrote: >> ActiveRecord::MultiparameterAssignmentErrors in SpecController#edit >> >> 1 error(s) on assignment of multiparameter attributes ....dave > > You might try wrapping the options in {} so date_select doesn''t get > confused. Or maybe try using the form_for syntax. > > > -- > Greg Donald > Cyberfusion Consulting > http://cyberfusionconsulting.com/how did you eliminate your time of day in your date_select form helper?...dave -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---