This module adds the :scope configuration option to {FriendlyId::Configuration FriendlyId::Configuration}.
Gets the scope columns.
Checks to see if the :scope option passed to {FriendlyId::Base#friendly_id} refers to a relation, and if so, returns the realtion's foreign key. Otherwise it assumes the option value was the name of column and returns it cast to a String.
@return String The scope column
# File lib/friendly_id/scoped.rb, line 138 def scope_columns [@scope].flatten.map { |s| (reflection_foreign_key(s) or s).to_s } end
Generated with the Darkfish Rdoc Generator 2.