Module: ConcernsOnRails::Sluggable

Extended by:
ActiveSupport::Concern
Defined in:
lib/concerns_on_rails/sluggable.rb

Instance Method Summary collapse

Instance Method Details

#slug_sourceObject

Instance methods Returns the source for the slug we are calling the class attribute, so we can use it in the lambda Example:

record.slug_source


55
56
57
58
# File 'lib/concerns_on_rails/sluggable.rb', line 55

def slug_source
  field = self.class.sluggable_field
  respond_to?(field) ? send(field) : to_s
end