Sha256: 30bcd4d7072e27c9bdaf871f0467a4e243523f7aad12523ee11020ab3b8070df
Contents?: true
Size: 308 Bytes
Versions: 2
Compression:
Stored size: 308 Bytes
Contents
module AmpleAssets module PluginMethods def has_asset(name = 'file', options = {}) configuration = { :foreign_key => "#{name}_id", :class_name => 'AmpleAssets::File' } configuration.update(options) if options.is_a?(Hash) self.belongs_to name, configuration end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ample_assets-0.0.2 | lib/ample_assets/plugin_methods.rb |
ample_assets-0.0.1 | lib/ample_assets/plugin_methods.rb |