Module: Card::Set::Right::Account::Events
- Extended by:
- Card::Set
- Defined in:
- platypus/tmp/set/gem-defaults/mod014-account/right/account/events.rb
Overview
Set: All “+Account+Events” cards (Events)
ON CREATE
Constant Summary
Constants included from Helpers
Helpers::SET_PATTERN_TEST_REGEXP
Constants included from Event::Api
Class Method Summary collapse
Instance Method Summary collapse
-
#event: activate_account ⇒ Object
NOTE: this only works in the context of an action.
-
#event: delete_account ⇒ Object
-
#event: password_redirect ⇒ Object
-
#event: reset_password ⇒ Object
reset password emails contain a link to update the +*account card and trigger this event.
-
#event: set_default_salt ⇒ Object
-
#event: set_default_status ⇒ Object
-
#event: signout_upon_delete ⇒ Object
-
#event: verify_and_activate ⇒ Object
Methods included from Card::Set
Methods included from I18nScope
Methods included from Card::Set::Registrar
#extended, #finalize_load, #process_base_modules, #register_set
Methods included from Helpers
#format_module, #format_modules, #method_missing, #modules, #pattern_code, #respond_to_missing?, #set_name_parts, #shortname, #underscored_name
Methods included from AdvancedApi
#assign_type, #attachment, #define_set_from_error, #ensure_set, #setting_opts, #stage_method
Methods included from Format
#before, #format, layout_method_name, #view, view_method_name, view_setting_method_name, wrapper_method_name
Methods included from Inheritance
#include_set, #include_set_formats
Methods included from Trait
#card_accessor, #card_reader, #card_writer, #require_field
Methods included from Event::Api
Class Method Details
.source_location ⇒ Object
8 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/right/account/events.rb', line 8 def self.source_location; "/Users/ethan/dev/decko/gem/mod/account/set/right/account/events.rb"; end |
Instance Method Details
#event: activate_account ⇒ Object
NOTE: this only works in the context of an action. if run independently, it will not activate an account
47 48 49 50 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/right/account/events.rb', line 47 event :activate_account do field :status, content: "active" trigger_event! :send_welcome_email end |
#event: delete_account ⇒ Object
52 53 54 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/right/account/events.rb', line 52 event :delete_account, :prepare_to_validate, on: :delete do subcard accounted.close_account end |
#event: password_redirect ⇒ Object
33 34 35 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/right/account/events.rb', line 33 event :password_redirect, :finalize, on: :update, when: :password_redirect? do success << { id: name, view: "edit" } end |
#event: reset_password ⇒ Object
reset password emails contain a link to update the +*account card and trigger this event
22 23 24 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/right/account/events.rb', line 22 event :reset_password, :prepare_to_validate, on: :update, trigger: :required do :reset_password_success, :reset_password_failure end |
#event: set_default_salt ⇒ Object
10 11 12 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/right/account/events.rb', line 10 event :set_default_salt, :prepare_to_validate, on: :create do field(:salt).generate end |
#event: set_default_status ⇒ Object
14 15 16 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/right/account/events.rb', line 14 event :set_default_status, :prepare_to_validate, on: :create do field :status, content: accounted&.try(:default_account_status) || "active" end |
#event: signout_upon_delete ⇒ Object
56 57 58 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/right/account/events.rb', line 56 event :signout_upon_delete, :integrate, on: :delete, when: :current_account? do Self::Signin.signout end |
#event: verify_and_activate ⇒ Object
26 27 28 29 30 31 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/right/account/events.rb', line 26 event :verify_and_activate, :prepare_to_validate, on: :update, trigger: :required do activatable do :verify_and_activate_success, :verify_and_activate_failure subcard(accounted)&.try :activate_accounted end end |