class Grape::Roar::Extensions::Relations::Adapters::Mongoid
Public Instance Methods
collection_methods()
click to toggle source
# File lib/grape/roar/extensions/relations/adapters/mongoid.rb, line 13 def collection_methods @collection_methods ||= %i[ embeds_many has_many has_and_belongs_to_many ] end
name_for_represented(represented)
click to toggle source
# File lib/grape/roar/extensions/relations/adapters/mongoid.rb, line 19 def name_for_represented(represented) klass_name = if represented.instance_of?( ::Mongoid::Relations::Targets::Enumerable ) represented.klass.name else represented.class.name end klass_name.demodulize.pluralize.downcase end
single_entity_methods()
click to toggle source
# File lib/grape/roar/extensions/relations/adapters/mongoid.rb, line 30 def single_entity_methods @single_entity_methods ||= %i[has_one belongs_to embeds_one] end