Skip to content

Instantly share code, notes, and snippets.

@no-reply
Created July 11, 2018 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save no-reply/5f74bae24107758b29bd9f07e649d0eb to your computer and use it in GitHub Desktop.
Save no-reply/5f74bae24107758b29bd9f07e649d0eb to your computer and use it in GitHub Desktop.
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