background
i have a page with a drop-down menu item. if any of the choices is
selected, a partial gets activated to appear with new drop-down menu
choices. the initial page uses a select_tag, observe_field, and a div
to implement the above desired functionality. the pages i am working
with comprise a sub/child area within an “admin” area. this all used
to work, but for some reason stopped work at some unknown time.
troubleshooting
i’m looking at the log, and it seems to me that when i am at the
initial page (and surrounding pages), i am in the desired controller.
routing appears to be working as expected. however, when i test my
drop-down menu, it appears as though 1) the :url => {:controller => …
details are being ignored; and 2) the parent “admin” controller only
is getting processed rather than the supposed current “admin/assets”
controller. it is as if the default, last route, " map.connect
‘:controller/:action/:id’ " is being consulted rather than the :url in
observe_field or anything else higher pertaining to admin and assets
in routes. “assets” gets parsed as/demoted to an action rather than
as part of the controller.
<%= select_tag(:type, options_for_select([’[select
one]’,‘page’,‘program’,‘event’]), :id => ‘type_selection’) %>
<%= observe_field(‘type_selection’,
:frequency => 0.5,
:update => ‘page_selection’,
:url => {:controller => “admin/assets”, :action => :set_pages},
:with => “‘type=’+$(‘type_selection’).value”) %>
set_pages is defined as a method in the admin/assets controller.
questions
what (routing) is taking precedence? where is observe_field getting
its instructions from instead, why does it seem as if its :url
argument is being ignored?
i’ve performed the usual basic tasks, such as restarting the
application, etc. but obviously i’m missing something… probably
something very basic please advise.