Greetings
Anyone see anything obvious or know of any occurrences of this kind of
issue.
In the process of testing deployment to a new hosting environment we
found this issue.
this operation works on current production servers
and on all development machines, so we are kind stumped why the params
of getting messed up.
Config has been replicated from our existing setup.
this field observer is rendering correctly
<%= business_image_chooser(100, 100, āChoose imageā, :id =>
āmini_job_ad_logo_uploadā, :callback_function =>
āselect_mini_ad_logoā) %>
<%= observe_field(āmini_job_ad_logo_idā, :frequency => 1, :url =>
{ :action => :update_mini_ad_logo},
:with => āālogo_id=ā + escape($(āmini_job_ad_logo_idā).value) +
ā&position_profile_id=ā + escape($(āposition_profile_idā).value)ā) %>
<% end %>
CDATA[\nnew Form.Element.Observer(āmini_job_ad_logo_idā
, 1, function(element, value) {new Ajax.Request(ā/business/positions/
job_ad/update_mini_ad_logoā, {asynchronous
:true, evalScripts:true, parameters:ālogo_id=ā + escape($
(āmini_job_ad_logo_idā).value) + '&position_profile_id
=ā + escape($(āposition_profile_idā).value)})})\n//]]
but when the observer submits its ajax request
the params end up being parsed out incorrectly
Parameters: {āposition_profile_idā=>ā95ā, āactionā=>ājob_adā,
āidā=>āupdate_mini_ad_logoā, ācontrollerā=>ābusiness/positionsā,
ālogo_idā=>ā561ā}
they should be
Parameters: {āposition_profile_idā=>ā95ā,
āactionā=>āupdate_mini_ad_logoā, ācontrollerā=>ābusiness/positions/
job_adā, ālogo_idā=>ā561ā}
so it ends up submitting to the wrong controller thus we get
ActionController::UnknownAction (No action responded to job_ad):
here are the routes that deals with this section
map.resource :business do |business|
business.resources :positions, :controller => ābusiness/
positionsā, :collection => {:getting_started => :get, :list
=> :get}, :member => {:close => :put, :extend_position => :put} do |
positions|
positions.resource :details, :controller => ābusiness/positions/
detailsā
positions.resource :hiring_details, :controller => ābusiness/
positions/hiring_detailsā
positions.resource :applicant_profile, :controller => ābusiness/
positions/applicant_profileā
positions.resource :package_preferences, :controller =>
ābusiness/positions/package_preferencesā
positions.resource :working_details, :controller => ābusiness/
positions/working_detailsā
positions.resource :training_development_details, :controller
=> ābusiness/positions/training_development_detailsā
positions.resource :job_ad, :controller => ābusiness/positions/
job_adā
positions.resource :posting, :controller => ābusiness/positions/
postingā
positions.resource :management, :controller => ābusiness/
positions/managementā
positions.resources :job_applications, :controller => ābusiness/
positions/job_applicationsā
end
The sysadmin and I have been through all the configs and they are
identical.
The error occurs when going directly to one of the mongrels so i
believe that rules out any possible apache issues
hope i have been detailed enough here
Cheers
Steven
/************************************************/
Steven H.
Programmer, Web D., IT Consultant
Composer, Producer, Performer, DJ
p. 0437 541 276
e. [email protected]
/************************************************/