Skip to content

Instantly share code, notes, and snippets.

@sergiomaia
Last active December 14, 2016 14:22
Show Gist options
  • Save sergiomaia/34cd3922f06a4861b6015e6bf50727a0 to your computer and use it in GitHub Desktop.
Save sergiomaia/34cd3922f06a4861b6015e6bf50727a0 to your computer and use it in GitHub Desktop.
# app/controllers/registration_controller.rb
class RegistrationsController < ApplicationController
respond_to :html
def new
@registration = Registration.new
end
def create
@registration = Registration.new(registration_params)
@registration.save
respond_with @registration, location: some_success_path
end
private
def registration_params
# ...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment