Class: ActiveRecord::Reflection::ThroughReflection

Inherits:
Object
  • Object
show all
Defined in:
lib/activerecord_sortable/through_reflection.rb

Instance Method Summary collapse

Instance Method Details

#sortable?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/activerecord_sortable/through_reflection.rb', line 10

def sortable?
  @delegate_reflection.options.fetch(:sortable, false)
end

#sortable_fieldObject



6
7
8
# File 'lib/activerecord_sortable/through_reflection.rb', line 6

def sortable_field
  @delegate_reflection.options.fetch(:sortable_field, :position).to_sym
end