Class: Home::Operation::Index
- Inherits:
-
Base::Operation::Base
- Object
- Base::Operation::Base
- Home::Operation::Index
- Defined in:
- lib/generators/tsykvas_rails_template/install/templates/app/concepts/home/operation/index.rb
Overview
Canonical example operation. Replace with real logic when the home page
becomes more than a placeholder. Demonstrates the three required calls:
authorize!, skip_policy_scope, and assigning self.model.
Instance Method Summary collapse
Instance Method Details
#perform!(params:, current_user:) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/generators/tsykvas_rails_template/install/templates/app/concepts/home/operation/index.rb', line 9 def perform!(params:, current_user:) :home, :index? skip_policy_scope self.model = OpenStruct.new( message: "Welcome — your app is wired up with tsykvas_rails_template." ) end |