Skip to content

Instantly share code, notes, and snippets.

@zackn9ne
Created May 28, 2014 14:49
Show Gist options
  • Select an option

  • Save zackn9ne/6c3fbd0aff180f8feef3 to your computer and use it in GitHub Desktop.

Select an option

Save zackn9ne/6c3fbd0aff180f8feef3 to your computer and use it in GitHub Desktop.
Rails 4 Private Controller
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