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
-
#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
22 23 24 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 22 def activate_accounted self.type_id = Card.default_accounted_type_id end |
#can_approve? ⇒ Boolean
18 19 20 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 18 def can_approve? Card.new(type_id: Card.default_accounted_type_id).ok? :create end |
#default_account_status ⇒ Object
14 15 16 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 14 def default_account_status can_approve? ? "unverified" : "unapproved" end |
#event: act_as_current_for_integrate_stage ⇒ Object
42 43 44 45 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 42 event :act_as_current_for_integrate_stage, :integrate, on: :create do # needs justification! Auth.current_id = id end |
#event: approve_with_verification ⇒ Object
30 31 32 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 30 event :approve_with_verification, :validate, on: :update, trigger: :required do approvable { request_verification } end |
#event: approve_without_verification ⇒ Object
34 35 36 37 38 39 40 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 34 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
26 27 28 |
# File 'platypus/tmp/set/gem-defaults/mod014-account/type/signup.rb', line 26 event :auto_approve_with_verification, :validate, on: :create, when: :can_approve? do request_verification end |