How do I get a value from datetime_select? Do I need to get each value
from it’s dropdown element individually or is there a way to get the
date by referencing one object? Anyone have any good examples?
-Andy
How do I get a value from datetime_select? Do I need to get each value
from it’s dropdown element individually or is there a way to get the
date by referencing one object? Anyone have any good examples?
-Andy
Andrew D. Goodfellow wrote:
How do I get a value from datetime_select? Do I need to get each value
from it’s dropdown element individually or is there a way to get the
date by referencing one object? Anyone have any good examples?
Rails will automatically instantiate a Time attribute from the set of
component param keys and values if you call new, update_attribute,
or update_attributes with the appropriate part of the params hash.
–
We develop, watch us RoR, in numbers too big to ignore.
Rails will automatically instantiate a Time attribute from the set of
component param keys and values if you call new, update_attribute,
or update_attributes with the appropriate part of the params hash.
Sorry, I don’t get it. I have something like
<%= datetime_select ‘bill’, ‘activity_from’ %>
which generates a bunch of selectors to pick up the date and time… but
how do I access it in the action where the form is posted to?
@from = DateTime.new(params[:bill][:activity_from])
or
@from = params[:bill][:activity_from]
?
Please give me a hint,
Thank you in advance!
Andreas
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs