Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typeof array condition #1

Open
wants to merge 1 commit into
base: data-method-with-params
Choose a base branch
from

Conversation

star-diopside
Copy link

I see rails/jquery-ujs PR rails#395, but it don't work normally by array params.

<a href="xxx" data-method="post" data-params="{key:['val1','val2']}">xxx</a>

I expect the following movement rails controller params.

{ "key" => ["val1", "val2"] }

However, I really work as follows.

{ "key" => { "0" => "val1", "1" => "val2" } }

Is this movement not a problem? Javascript typeof don't match 'array', should I use 'jQuery.isArray'

@star-diopside star-diopside force-pushed the data-method-with-params-array-fix branch from db977b3 to 641b18c Compare September 3, 2015 00:34
@KODerFunk
Copy link
Owner

I dive in this after 25 feb.

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.

2 participants