Module: Creators
- Defined in:
- lib/creators/creator.rb,
lib/creators.rb,
lib/creators/version.rb
Overview
Creators are used to host code dealing with creation of new models and clean up the controllers.
EXAMPLE:
class SomeCreator
def refine_params
# a hash with refined parameters required for the model.
end
end
class SomeController
def action
model = SomeCreator.new(params)
if model.save
# good flow
else
# bad flow
end
end
end
Defined Under Namespace
Constant Summary collapse
- VERSION =
0.91