bernat/best_in_place — Issue #66: Change updated object in several places
Author: link-er
Created: 2011-12-26 14:37:49+00:00
State: open

Hello
I use best_in_place in dialog window over the page that contains same objects, that I'm updating in dialog.
I.e. I have page:

......

<% @project_groups.each do |group| %>

"><%= link_to group.name, "#{projects_path}?scope=#{group.id}" %>

<% end %>

<%= render 'project_groups/list' %>

.......

I have _list:

<%= render @project_groups %>

<%= t "project_group.new_project_group" %>

<%= semantic_form_for current_account.project_groups.new, :validate => true, :remote => true do |f| %>
<%= render 'project_groups/form', :f => f %>
<% end %>

And I have _project_group:

">
<%= best_in_place project_group, :name, :type => :input, :path => update_inline_project_group_path(project_group) %>
<% if project_group.projects.all.empty? %>
<%= link_to t('share.destroy'), project_group, "data-confirm" => t('share.are_you_sure'), "data-method" => :delete, :remote => true, :disable_with => '' %>
<% end %>

So I want to change project groups names on page after user update it in dialog. Is it possible?