Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Made it possible to call has_details multiple times on the same column

  • Loading branch information...
commit b7cdc5176e46d081662ecdfc0d1976a1346b5d11 1 parent 261f2bf
@tarmo tarmo authored erkki committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/has_details.rb
5 lib/has_details.rb
@@ -37,7 +37,10 @@ def has_details(options = {})
raise(ArgumentError, "You must be supply at least one field in the configuration hash") unless configuration.keys.size > 0
# raise(Exception, "A #{configuration[:column]} column must be present in the database for this plugin.") unless columns.include?(:details)
- serialize configuration.delete(:column), Hash
+ col = configuration.delete(:column).to_s
+ unless serialized_attributes[col]
+ serialize col, Hash
+ end
configuration.each do |f,t|
Please sign in to comment.
Something went wrong with that request. Please try again.