Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

allow permitted_params to be a private method #271

Merged
merged 1 commit into from

2 participants

@rubysolo

The examples in the strong_parameters README show a private method
for parameter sanitization. This tiny change allows for following
that pattern.

@rubysolo rubysolo allow permitted_params to be a private method
The examples in the strong_parameters README show a private method
for parameter sanitization.  This tiny change allows for following
that pattern.
1836426
@joelmoss joelmoss merged commit 0eed415 into josevalim:master
@rubysolo rubysolo deleted the rubysolo:allow-private-method branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 8, 2013
  1. @rubysolo

    allow permitted_params to be a private method

    rubysolo authored
    The examples in the strong_parameters README show a private method
    for parameter sanitization.  This tiny change allows for following
    that pattern.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/inherited_resources/base_helpers.rb
View
2  lib/inherited_resources/base_helpers.rb
@@ -312,7 +312,7 @@ def resource_params
# extract attributes from params
def build_resource_params
- parameters = respond_to?(:permitted_params) ? permitted_params : params
+ parameters = respond_to?(:permitted_params, true) ? permitted_params : params
rparams = [parameters[resource_request_name] || parameters[resource_instance_name] || {}]
if without_protection_given?
rparams << without_protection
Something went wrong with that request. Please try again.