Skip to content

Fix params not being hash by default - #339

Merged
shishirmk merged 1 commit into
Netflix:devfrom
mhluska:fix-params-not-being-default
Nov 3, 2018
Merged

Fix params not being hash by default#339
shishirmk merged 1 commit into
Netflix:devfrom
mhluska:fix-params-not-being-default

Conversation

@mhluska

@mhluska mhluska commented Oct 18, 2018

Copy link
Copy Markdown
Contributor

This fixes a minor thing that has been nagging at me for a while: I always had to do params && params[:foo] in an attribute block because params is undefined unless the controller explicitly passes it. I think we should be able to expect params to always be defined.

The bug occurs when no options are passed and the early return return if options.blank? prevents params being set to {} by default.

@manojmj92

manojmj92 commented Oct 18, 2018 via email

Copy link
Copy Markdown
Contributor

@shishirmk
shishirmk merged commit 74bb9d6 into Netflix:dev Nov 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants