Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makes form_helper use overriden model accessors
[#3374 state:committed]
- Loading branch information
1 parent
f78de68
commit fb0bd8c
Showing
2 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fb0bd8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Thank you.
fb0bd8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're welcome this patch is around since Rails used track, i don't know why nobody did a patch yet
fb0bd8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably broke searchlogic, already opened an issue here: http://github.com/binarylogic/searchlogic/issues/issue/111
fb0bd8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@masterkain nice!!!
fb0bd8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit causes issue with Time fields in MySQL. Instead of rendering the time (12:30) from the database it is now rendering the casted DateTime (Sat Jan 01 12:30:00 UTC 2000).
fb0bd8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jduff can you provide a test case? also it would be awesome if you can add a ticket on lighthouse and assign to me. Really appreciate your comment ;)
fb0bd8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just saw your ticket https://rails.lighthouseapp.com/projects/8994/tickets/5466 cool
fb0bd8c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya, I've been looking at it with Chris who opened the ticket. It seems like before it was just getting the string from the database and now you get back a time object. I guess the best solution is to pass :value => time.to_s(:short) or whatever formatting you want to the input call. This way you're controlling the formatting and not just displaying whatever happens to be in the database. It was just a little surprising when moving between the RC versions.