Skip to content

Instantly share code, notes, and snippets.

@laser
Created April 14, 2014 17:25
Show Gist options
  • Save laser/10667369 to your computer and use it in GitHub Desktop.
Save laser/10667369 to your computer and use it in GitHub Desktop.
01: UsersController
class UsersController < ApplicationController
def index
@users = User.all
end
def new; end
def create
User.new(user_params).save!
redirect_to action: 'index'
end
private
def user_params
params.require(:user).permit(:full_name, :phone_number, :email)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment