Module: Card::Set::Type::Signup
- Extended by:
- Card::Set
- Defined in:
- platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb,
platypus/tmp/set/gem-defaults/mod014-account/type/signup/views.rb
Overview
Set: All “Signup” cards
Defined Under Namespace
Modules: Views
Constant Summary
Constants included from Helpers
Helpers::SET_PATTERN_TEST_REGEXP
Constants included from Event::Api
Class Method Summary collapse
Instance Method Summary collapse
-
#activate_accounted ⇒ Object
-
#can_approve? ⇒ Boolean
-
#default_account_status ⇒ Object
TODO: either justify separating these two statuses or merge them.
-
#event: act_as_current_for_integrate_stage ⇒ Object
-
#event: approve_with_verification ⇒ Object
-
#event: approve_without_verification ⇒ Object
-
#event: auto_approve_with_verification ⇒ Object
Methods included from Card::Set
Methods included from I18nScope
Methods included from 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 Card::Set::Trait
#card_accessor, #card_reader, #card_writer, #require_field
Methods included from Event::Api
Class Method Details
.source_location ⇒ Object
7 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 7 def self.source_location; "/Users/ethan/dev/decko/gem/mod/account/set/type/signup.rb"; end |
Instance Method Details
#activate_accounted ⇒ Object
23 24 25 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 23 def activate_accounted self.type_id = Card.default_accounted_type_id end |
#can_approve? ⇒ Boolean
19 20 21 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 19 def can_approve? Card.new(type_id: Card.default_accounted_type_id).ok? :create end |
#default_account_status ⇒ Object
TODO: either justify separating these two statuses or merge them
15 16 17 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 15 def default_account_status can_approve? ? "unverified" : "unapproved" end |
#event: act_as_current_for_integrate_stage ⇒ Object
43 44 45 46 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 43 event :act_as_current_for_integrate_stage, :integrate, on: :create do # needs justification! Auth.current_id = id end |
#event: approve_with_verification ⇒ Object
31 32 33 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 31 event :approve_with_verification, :validate, on: :update, trigger: :required do approvable { request_verification } end |
#event: approve_without_verification ⇒ Object
35 36 37 38 39 40 41 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 35 event :approve_without_verification, :validate, on: :update, trigger: :required do # TODO: if validated here, add trigger and activate in storage phase approvable do activate_accounted field(:account).activate_account end end |
#event: auto_approve_with_verification ⇒ Object
27 28 29 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 27 event :auto_approve_with_verification, :validate, on: :create, when: :can_approve? do request_verification end |