lib/generators/dry_crud/templates/app/controllers/crud_controller.rb
# Create a new entry of this model from the passed params.
# There are before and after create callbacks to hook into the action.
# To customize the response, you may overwrite this action and call
# super with a block that gets the format parameter.
#   POST /entries
#   POST /entries.json
Create a new entry of this model from the passed params.
There are before and after create callbacks to hook into the action.
To customize the response, you may overwrite this action and call
super with a block that gets the format parameter.
Create a new entry of this model from the passed params . There are before and after create callbacks to hook into the action . To customize the response you may overwrite this action and call super with a block that gets the format parameter .
def create(&block)
    assign_attributes
    created = with_callbacks(:create, :save) { entry.save }
    respond_with(entry, :success => created, &block)
  end
def create ( & block ) assign_attributes created = with_callbacks ( :create , :save ) { entry . save } respond_with ( entry , :success => created , & block ) end
Create a new entry of this model from the passed params.
Create a new entry of this model from the passed params .
block