Module: ActiveManageable::Methods::Show
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/active_manageable/methods/show.rb
Instance Method Summary collapse
Instance Method Details
#show(id:, options: {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/active_manageable/methods/show.rb', line 11 def show(id:, options: {}) initialize_state(options: ) @target = action_scope includes(@options[:includes]) select(@options[:select]) yield if block_given? @target = find_object_for_show(id: id) (record: @target) @target end |