The following code works perfectly in FF, but does not work in
safari.
I''m on Edge Rails with the latest javascripts. Any clue what''s
going
on?
CONTROLLER:
def create
@program = @school.programs.new(params[:program])
if @program.save
render :update do |page|
page[:program_list].replace_html(:partial =>
''program'', :collection => @school.programs)
page[@program.dom_id].visual_effect(:highlight, :duration =>
1)
page[:program_form].reset
end
end
end
VIEW - index.rhtml
<div class="programs">
<ul id="program_list">
<%= render :partial => ''program'',
:collection =>
@school.programs %>
</ul>
<% remote_form_for :program,
:url => programs_path,
:method => :post,
:html => { :id =>
''program_form'' } do |p| %>
<%= p.text_field :name %>
<%= submit_tag ''Add this program'' %>
<% end -%>
</div>
VIEW - _program.rhtml
<li id="<%= program.dom_id %>"><%=h program.name
%></li>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---