Class: AmazingActivist::Base
- Inherits:
-
Object
- Object
- AmazingActivist::Base
- Extended by:
- Irresistible
- Defined in:
- lib/amazing_activist/base.rb
Overview
Abstract activity class.
Example
- source,ruby
class OnboardActivity < AmazingActivist::Base
prop :params, _Hash(Symbol, _Any?), :** def call user = User.new(params) return success(user) if user.save failure(:invalid_params, user: user) endend
case OnboardActivity.call(email: “[email protected]”) in success: user
Current.user = user redirect_to dashboard_urlelse
render :new, status: :unprocessable_entityend