Created
September 29, 2013 16:00
-
-
Save gouravtiwari/6753758 to your computer and use it in GitHub Desktop.
Fix for mass assignment for rails engine gem to work on rails-3 and rails-4 both
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
| # If it is Rails-3 then using attar_accessible in model: | |
| def self.needs_attr_accessible? | |
| Rails::VERSION::MAJOR == 3 | |
| end | |
| if needs_attr_accessible? | |
| attr_accessible :list_of_attributes | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment