Skip to content
This repository has been archived by the owner on Oct 23, 2018. It is now read-only.

Add pattern permitted params #12

Merged
merged 2 commits into from
Aug 4, 2014
Merged

Add pattern permitted params #12

merged 2 commits into from
Aug 4, 2014

Conversation

silviolrjunior
Copy link
Contributor

No description provided.

self.name.chomp('PermittedParams').singularize.constantize
rescue NameError
self.name.chomp('PermittedParams').split('::').last.singularize.constantize
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

end at 7, 4 is not aligned with def at 3, 2

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) when pulling 7d51ac5 on add-permitted-params into 9055feb on master.

@plribeiro3000
Copy link
Contributor

@silviolrjunior Can you rebase this please?

The build issues were unrelated to the project code. All i had to fix were the simplecov being loaded in ruby 1.8.7. 🍻

@@ -33,12 +33,16 @@ def edit
end

def create
instance_variable_set("@#{service.interface_name}", service.create(params))
permitted_params = "::#{self.class.name.chomp('Controller').concat('PermittedParams')}".constantize.new(params).create rescue nil

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid using rescue in its modifier form.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) when pulling 6f9d422 on add-permitted-params into cc8471c on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) when pulling 2173b5f on add-permitted-params into cc8471c on master.

plribeiro3000 added a commit that referenced this pull request Aug 4, 2014
@plribeiro3000 plribeiro3000 merged commit f9b07a4 into master Aug 4, 2014
@plribeiro3000 plribeiro3000 deleted the add-permitted-params branch August 4, 2014 12:27
@plribeiro3000
Copy link
Contributor

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants