Module: PyrRules

Defined in:
app/rules/pyr_rules/model_event_emitter.rb,
lib/pyr_rules.rb,
app/models/pyr_rules.rb,
lib/pyr_rules/engine.rb,
lib/pyr_rules/version.rb,
app/rules/pyr_rules/rules_config.rb,
app/rules/pyr_rules/rules_engine.rb,
app/rules/pyr_rules/event_concerns.rb,
app/rules/pyr_rules/event_subscriber.rb,
app/rules/pyr_rules/event_config_loader.rb,
app/controllers/pyr_rules/rules_controller.rb,
app/rules/pyr_rules/controller_event_emitter.rb

Overview

This will hook into ActiveRecordCallbacks and raise the appropriate crud events

For reference: api.rubyonrails.org/classes/ActiveRecord/Callbacks.html

For sanity: (-) save (-) valid (1) before_validation (-) validate (2) after_validation (3) before_save (4) before_create (-) create (5) after_create (6) after_save (7) after_commit -or- after_rollback

(1) before_destroy

(-) destroy (2) after_destroy

(-) find (1) after_find (2) after_initialize

Defined Under Namespace

Modules: ActionsHelper, ControllerEventEmitter, EventConcerns, EventsHelper, ModelEventEmitter, RulesHelper Classes: Action, ActionHandler, ActionsController, EmailActionHandler, Engine, EventConfigLoader, EventSubscriber, EventsController, ModelCreationHandler, Rule, RuleContext, RulesConfig, RulesController, RulesEngine, WebRequestLogger

Constant Summary collapse

VERSION =
0.9
@@table_name_prefix =
"pyr_"
@@trash_icon =

fa fa-trash-o

"icon-trash"
@@delete_icon =

fa fa-times-circle-o

"icon-remove"
@@arrow_icon =

fa fa-arrow-right

"icon-arrow-right"
@@lookup_icon =

fa fa-search

"icon-search"
@@active_record =
true
@@development_model_paths =
[]

Class Method Summary collapse

Class Method Details

.setup {|_self| ... } ⇒ Object

Default way to setup Rules

Yields:

  • (_self)

Yield Parameters:

  • _self (PyrRules)

    the object that the method was called on



30
31
32
# File 'lib/pyr_rules.rb', line 30

def self.setup
  yield self
end