Hello Hobo users.
Two questions about date[s] in hobo:
- how can I change the default of 5 years which I get to see in views
having a date ?
I would like to setup my own range, e.g. Date.today.beginning_of_year
- 80.years
- how can I best patch the 'invalid date' error for cases where the
user selects, for example, 31/2 which is invalid.
The problem comes from
if value.is_a? Hash
parts = %w{year month day}.map{|s| value[s].to_i}
if parts.include?(0)
nil
else
Date.new(*parts) <<<<<<<<<<<<<<<<<<<<< HERE
end
else
value
end
see hobo-1.0.2/lib/hobo/model.rb
Thanks! This stuff is awesome!
Sergey
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.