module MongoidApiBase
Holds all default actions for MongoidApiBase
.
Base helpers for MongoidApiBase
work. Some methods here can be overwritten and you will need to do that to customize your controllers.
Constants
- JSON_DEFAULT_ATTRIBUTES
- VERSION
Public Instance Methods
csv_config(options={})
click to toggle source
# File lib/mongoid-api-base.rb, line 71 def csv_config(options={}) self.csv_options = options end
defaults(options)
click to toggle source
# File lib/mongoid-api-base.rb, line 61 def defaults(options) if options.key?(:resource_class) self.resource_class = options[:resource_class] end if options.key?(:per_page) self.per_page = options[:per_page] end end
json_config(options)
click to toggle source
# File lib/mongoid-api-base.rb, line 75 def json_config(options) self.json_options = options end