calebhearth / formulaic

Simplify form filling with Capybara
MIT License
552 stars 29 forks source link

`action` var shows up as unassigned variable #35

Closed jessieay closed 9 years ago

jessieay commented 9 years ago

Would it be possible for action: to be used as a hash key? Shows up as an unused variable when used correctly, which makes it a bit confusing to use.

screen shot 2014-09-29 at 11 56 58 am

jessieay commented 9 years ago

Perhaps this should be a change to README? let me know and I can submit change, just dont want to go through effort if that is not wanted for some reason

calebhearth commented 9 years ago

At a glance, that appears to be a hound big, not a Formulaic issue, but I'll take a look again when I have a bit more bandwidth of you disagree.

jessieay commented 9 years ago

FWIW, syntastic (vim plugin) also shows it to be a syntax error. It does work, it just feels off given the syntastic / Hound unhappiness

calebhearth commented 9 years ago

It's valid, but newer syntax.

On Sep 29, 2014, at 2:10 PM, Jessie A. Young notifications@github.com wrote:

FWIW, syntastic (vim plugin) also shows it to be a syntax error. It does work, it just feels off given the syntastic / Hound unhappiness

— Reply to this email directly or view it on GitHub.

calebhearth commented 9 years ago

Here's your problem: that's not how keyword arguments work, nor is action a kwarg.

You're creating and not using a local variable.

On Sep 29, 2014, at 2:10 PM, Jessie A. Young notifications@github.com wrote:

FWIW, syntastic (vim plugin) also shows it to be a syntax error. It does work, it just feels off given the syntastic / Hound unhappiness

— Reply to this email directly or view it on GitHub.

jessieay commented 9 years ago

yes I know. But the README says to do it this way :)

calebhearth commented 9 years ago

Stupid README. That's wrong; patches welcome.