Module: AmpleAssets::PluginMethods
- Defined in:
- lib/ample_assets/plugin_methods.rb
Instance Method Summary collapse
Instance Method Details
#has_asset(name = :file, options = {}) ⇒ Object
4 5 6 7 8 |
# File 'lib/ample_assets/plugin_methods.rb', line 4 def has_asset(name = :file, = {}) configuration = { :foreign_key => "#{name}_id", :class_name => 'AmpleAssets::File' } configuration.update() if .is_a?(Hash) self.belongs_to name, configuration end |