Class: Cancan::Generators::PermitsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Cancan::Generators::PermitsGenerator
- Extended by:
- RailsAssist::UseMacro
- Defined in:
- lib/generators/cancan/permits/permits_generator.rb
Instance Method Summary collapse
Instance Method Details
#main_flow ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/generators/cancan/permits/permits_generator.rb', line 22 def main_flow default_roles.each do |role| template_permit role end template_permit :any, :any_permit template_permit :system, :barebones_permit permit_logic = base_logic get_roles.each do |role| template_permit(role) if !skip_permit?(role) end permits_initializer if permits_initializer? end |