Created
July 11, 2018 15:08
-
-
Save no-reply/5f74bae24107758b29bd9f07e649d0eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyActor < Hyrax::Actors::AbstractActor | |
def create(env) | |
titlilze(env, attribute: :title) && next_actor.create(env) | |
end | |
private | |
def titlize(env, attribute:) | |
env.attributes[:attribute] = env.attributes[:attribute].map(&:titlize) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment