Skip to content

Commit

Permalink
Made it possible to call has_details multiple times on the same column
Browse files Browse the repository at this point in the history
  • Loading branch information
tarmo authored and erkki committed Feb 9, 2010
1 parent 261f2bf commit b7cdc51
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/has_details.rb
Expand Up @@ -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(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) # 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| configuration.each do |f,t|


Expand Down

0 comments on commit b7cdc51

Please sign in to comment.