Skip to content

Instantly share code, notes, and snippets.

@coderdan
Created October 21, 2014 04:40
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 coderdan/9c2975cf9cc1c46baf18 to your computer and use it in GitHub Desktop.
Save coderdan/9c2975cf9cc1c46baf18 to your computer and use it in GitHub Desktop.
def create
@form = ReminderForm.new(remindable.reminders.build)
if @form.validate(reminder_params)
@form.save do |params|
ReminderCreator.new(current_user, remindable, params).perform
redirect_to :back, notice: "Reminder '#{@form.title}' created successfully."
end
else
render :new
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment