end
def update
- user_params = params.require(:user).permit(:display_name, :new_email, :pass_crypt, :pass_crypt_confirmation, :auth_provider)
+ user_params = params.expect(:user => [:display_name, :new_email, :pass_crypt, :pass_crypt_confirmation, :auth_provider])
if params[:user][:auth_provider].blank? ||
(params[:user][:auth_provider] == current_user.auth_provider &&
##
# return permitted diary comment parameters
def comment_params
- params.require(:diary_comment).permit(:body)
+ params.expect(:diary_comment => [:body])
end
end
##
# return permitted diary entry parameters
def entry_params
- params.require(:diary_entry).permit(:title, :body, :language_code, :latitude, :longitude)
+ params.expect(:diary_entry => [:title, :body, :language_code, :latitude, :longitude])
rescue ActionController::ParameterMissing
ActionController::Parameters.new.permit(:title, :body, :language_code, :latitude, :longitude)
end
private
def issue_comment_params
- params.require(:issue_comment).permit(:body)
+ params.expect(:issue_comment => [:body])
end
# This sort of assumes there are only two roles
##
# return permitted message parameters
def message_params
- params.require(:message).permit(:title, :body)
+ params.expect(:message => [:title, :body])
rescue ActionController::ParameterMissing
ActionController::Parameters.new.permit(:title, :body)
end
def application_params
params[:oauth2_application][:scopes]&.delete("")
- params.require(:oauth2_application)
- .permit(:name, :redirect_uri, :confidential, :scopes => [])
- .merge(:owner => current_resource_owner)
+ params
+ .expect(:oauth2_application => [:name, :redirect_uri, :confidential, { :scopes => [] }])
+ .merge(:owner => current_resource_owner)
end
end
end
def report_params
- params.require(:report).permit(:details, :category)
+ params.expect(:report => [:details, :category])
end
def issue_params
end
def trace_params
- params.require(:trace).permit(:description, :tagstring, :visibility)
+ params.expect(:trace => [:description, :tagstring, :visibility])
end
end
##
# return permitted user parameters
def user_params
- params.require(:user).permit(:email, :display_name,
- :auth_provider, :auth_uid,
- :pass_crypt, :pass_crypt_confirmation)
+ params.expect(:user => [:email, :display_name,
+ :auth_provider, :auth_uid,
+ :pass_crypt, :pass_crypt_confirmation])
end
##