Module: Railslove::Plugins::FindByParam::ClassMethods
- Defined in:
- lib/spree_core/find_by_param.rb
Instance Method Summary collapse
Instance Method Details
#make_permalink(options = {}) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/spree_core/find_by_param.rb', line 43 def make_permalink(={}) [:field] ||= "permalink" if self.column_names.include?([:field].to_s) [:param] = [:field] before_validation(:on => :create){ save_permalink } end self. = extend Railslove::Plugins::FindByParam::SingletonMethods include Railslove::Plugins::FindByParam::InstanceMethods rescue # Database is not available (not a problem if we're running rake db:create or rake db:bootstrap) end |