I've uploaded my development project to my production server, and am
experiencing an odd effect.
All database find methods in which the date is passed as a param are
coming up nil -- it seems that there's an incompatibility in the date/
time format in there somewhere.
E.g. in the view, obtaining @date from the controller to the index
labs = Lab.all( :conditions => [ "patient_id = ?", id ], :order =>
"drawn DESC" )
@dates = []
labs.each { |lab| @dates << lab.drawn }
Then in the index view,
<% for date in @dates %>...
<%= link_to ... :date => date... %>
Then back in the show method in the controller:
@date = params[ :date ]
then
LabData.first ... :conditions => ... 'labs.drawn' => date
isn't finding it on the production server, but it was on the
development machine.
I've tried fiddling with the time zone settings on the production
server, no luck.
Has anyone encountered such a problem? Any ideas how to fix it?
Many TIA,
Craig
--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment