Skip to content

Instantly share code, notes, and snippets.

@tylerhunt
Created June 19, 2013 19:02
Show Gist options
  • Select an option

  • Save tylerhunt/5816978 to your computer and use it in GitHub Desktop.

Select an option

Save tylerhunt/5816978 to your computer and use it in GitHub Desktop.
Example usage of the strong_parameters gem.
class UsersController < ApplicationController
def update
current_user.update_attributes(user_params)
end
private
def user_params
params.require(:user).permit(:email, :password)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment