This generates what I would think would be the right option tags (and
they look right in show source as well) but when it’s returned to the
server :location_state => “None” insead of “”
Hmm I figured out where the problem is coming from. I’m using
observe_form to watch for changes in this form. The params that are
getting to the :url in observe_form are wrong. I’ve written a simple
test case:
Now if I submit the form render_params returns:
params:
— !map:HashWithIndifferentAccess
commit: Save changes
activity: !map:HashWithIndifferentAccess
location_type: “”
action: render_params
controller: params_test
request.params:
commit:
Save changes
activity[location_type]:
“”
If I change the form the ‘params’ div gets updated with:
— !map:HashWithIndifferentAccess
commit: Save changes
activity: !map:HashWithIndifferentAccess
location_type: None
action: render_params
controller: params_test
request.params:
commit:
Save changes
activity[location_type]:
None
Notice activity[location_type] is “None”! Argh!!! What is going on
here???
Weird it was a bug with the prototype library that shipped with Rails
on Locomotive. I updated my prototype.js file (which is smaller than
the one that was in public/javascripts/) and it started working.
Should I report a bug somewhere to someone (Locomotive?)
-dustin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.