Created
April 14, 2014 17:25
-
-
Save laser/10667369 to your computer and use it in GitHub Desktop.
01: UsersController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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