Comments (6)
Hm, the question is - how do we expect the URL to look like?
Let's say we are passing { types: [food, restaurant, shop] }
with your solution it generates:
localhost?types[]=food&types[]=restaurant&types[]=shop
The solution we have right now generates
localhost?types=[food, restaurant, shop]
However, the Google Places API separates by Pipe symbol (value1|value2|value3)
localhost?types=food|restaurant|shop
The fourth option is to use CSV
localhost?types=food,restaurant,shop
from bubblewrap.
The way Rails (and other frameworks) encode and expect the params is compatible with @tzusman patch:
>> { :types => ['food', 'restaurant', 'shop'] }.to_params
=> "types[]=food&types[]=restaurant&types[]=shop"
And that should also be true for POST params.
Maybe we can provide a wrapper method that takes an argument to pick the encoding style (rails, pipe, csv) with rails being the default?
from bubblewrap.
@mneorr as per our discussion, let's use the Rails default for 1.0 and add support for more encodings later on.
This is the last ticket before we push 1.0! \0/
from bubblewrap.
Sure, I'll amend the spec now and add the new behavior.
from bubblewrap.
The proposed solution would work great. Thanks for looking into this, and for building BubbleWrap!
from bubblewrap.
Added, tested ;)
Thanks @tzusman
from bubblewrap.
Related Issues (20)
- BubbleWrap::Location overriding ::Location HOT 3
- GestureRecognizer Helpers nulling out attributes inside callback block HOT 2
- BW::UIAlertView.plain_text_input crashes on the device HOT 7
- uninitialized constant BubbleWrap::Constants (NameError) HOT 2
- UIDevice.simulator? doesn't return true when running in simulator HOT 3
- There is any way to add a loading icon or image to the media player?
- Convert video to base64 HOT 1
- BW::Location no longer accessing CLLocation properly in iOS9.1 HOT 10
- BW::Mail.compose crashes app HOT 3
- Image sym is odd
- KVO broken in 9.3.1 (at least for NSDefaults)
- location get_once returns [CLLocationManager copyWithZone:]: unrecognized selector sent to instance
- BW::App.alert broken
- uninitialized constant Kernel::KCLAuthorizationStatusAuthorized
- unrecognized runtime type `{_simd_quatf=}' HOT 1
- iOS 11 image picker controller crash HOT 2
- UIAlert error
- Issue with Bubblewrap on 10.13.4 HOT 1
- Bubble wrap compiler errors on 11.4 (Xcode 9.4) HOT 5
- iOS 13 No longer supports MPMoviePlayerController HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bubblewrap.