Module: DynamicController::ActionControllerExtension
- Defined in:
- lib/dynamic_controller/action_controller_extension.rb
Instance Method Summary collapse
Instance Method Details
#has_crud_actions(options = {}) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/dynamic_controller/action_controller_extension.rb', line 4 def has_crud_actions(={}) @resource_options = Hash[.map { |k, v| [:only, :except].include?(k.to_sym) ? [k, [v].flatten.map(&:to_sym)] : [k, v] }].reverse_merge(only: DynamicController::ACTIONS, except: []) send :extend, ClassMethods send :include, InstanceMethods send :include, HelperMethods end |