Module: ActiveManageable::Methods::Index
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/active_manageable/methods/index.rb
Instance Method Summary collapse
Instance Method Details
#index(options: {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/active_manageable/methods/index.rb', line 14 def index(options: {}) initialize_state(options: ) @target = (record: model_class) search(@options[:search]) order(@options[:order]) scopes(@options[:scopes]) page(@options[:page]) includes(@options[:includes]) select(@options[:select]) distinct(unique_search?) yield if block_given? @target end |