Created
May 28, 2014 14:49
-
-
Save zackn9ne/6c3fbd0aff180f8feef3 to your computer and use it in GitHub Desktop.
Rails 4 Private Controller
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 create | |
| @user = User.new(user_params) | |
| # ... | |
| end | |
| private | |
| def user_params | |
| params.require(:user).permit(:username, :email, :password, :salt, :encrypted_password) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment