The upgrade to the last version of rails (1.2.1) and prototype (1.5.0)
seems to introduce a bug in the "in_place_editor''.
Below a piece of code from an application that was on production:
=== VIEW ==
<%= in_place_editor(
"salary_benefit_earnings_percentage_#{ salary_benefit.id }",
{ :size => 5,
:url => { :action => :update_benefit,
:attribute => "earnings_percentage",
:old_value => salary_benefit.earnings_percentage,
:id => salary_benefit.id } } ) %>
=== HTML SRC ==<script type="text/javascript">
//<![CDATA[
new
Ajax.InPlaceEditor(''salary_deduction_earnings_percentage_37'',
''/human_resources/personnel_members/update_deduction/37?attribute=earnings_percentage&old_value=13.0'',
{size:5})
//]]>
</script>
=== EVALUATION OF PARAMS IN THE CONTROLLER ==params
{"amp;old_value"=>"0.0",
"action"=>"update_deduction",
"id"=>"43",
"value"=>"5",
"controller"=>"human_resources/personnel_members",
"attribute"=>"fixed_number_of_hours"}
The URL in the html src has an & escaped, and one param has
''amp;''
prefixed to it. I tried with multiple interfaces where the
in_place_editor has a wrong behavior.
Is someone else having similar problems? Could it be a bug in the
in_place_editor or in the routing module?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---