Class: Hyrax::Actors::InterpretVisibilityActor
- Inherits:
-
AbstractActor
- Object
- AbstractActor
- Hyrax::Actors::InterpretVisibilityActor
- Defined in:
- app/actors/hyrax/actors/interpret_visibility_actor.rb
Defined Under Namespace
Classes: Intention
Instance Attribute Summary
Attributes inherited from AbstractActor
Instance Method Summary collapse
-
#create(env) ⇒ Boolean
True if create was successful.
-
#update(env) ⇒ Boolean
True if update was successful.
Methods inherited from AbstractActor
Constructor Details
This class inherits a constructor from Hyrax::Actors::AbstractActor
Instance Method Details
#create(env) ⇒ Boolean
Returns true if create was successful.
74 75 76 77 78 79 |
# File 'app/actors/hyrax/actors/interpret_visibility_actor.rb', line 74 def create(env) intention = Intention.new(env.attributes) env.attributes = intention.sanitize_params validate(env, intention, env.attributes) && apply_visibility(env, intention) && next_actor.create(env) end |
#update(env) ⇒ Boolean
Returns true if update was successful.
83 84 85 86 87 88 |
# File 'app/actors/hyrax/actors/interpret_visibility_actor.rb', line 83 def update(env) intention = Intention.new(env.attributes) env.attributes = intention.sanitize_params validate(env, intention, env.attributes) && apply_visibility(env, intention) && next_actor.update(env) end |