Created
June 20, 2012 03:49
-
-
Save we4tech/2958038 to your computer and use it in GitHub Desktop.
Fix 1 error(s) on assignment of multiparameter attributes for dynamic column or encapsulated column accessor
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
# Put it on your model instance | |
def column_for_attribute(name) | |
# Put your accessor name, in my case :value | |
if :value == name.to_sym | |
self.class.columns_hash[self.field.value_column.to_s] | |
else | |
self.class.columns_hash[name.to_s] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment