Skip to content

Instantly share code, notes, and snippets.

@we4tech
Created June 20, 2012 03:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save we4tech/2958038 to your computer and use it in GitHub Desktop.
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
# 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