Created
September 26, 2008 20:21
-
-
Save adelcambre/13194 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| def published=(binary_string) | |
| # We need this because the values get populated from the params | |
| attribute_set(:published, binary_string == "1") | |
| end |
This file contains hidden or 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
| article["published"] = true if article["published"] == "1" | |
| result = @article.update_attributes(article) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment