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)
[EMAIL PROTECTED](: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: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---