app/views/admin/pages/_page.html.erb in refinerycms-pages-0.9.9.19 vs app/views/admin/pages/_page.html.erb in refinerycms-pages-0.9.9.20
- old
+ new
@@ -1,11 +1,11 @@
<li class='clearfix record' id="<%= dom_id(page) -%>">
<div class='clearfix'>
<span class='title'>
<%= page.title_with_meta.html_safe %>
<% if defined?(::Refinery::I18n) and ::Refinery::I18n.frontend_locales.many? and
- (locales = page.translations.collect{|t| t.locale}).present? %>
+ (locales = page.translations.map(&:locale)).present? %>
<span class='preview'>
<% locales.each do |locale| %>
<%= link_to refinery_icon_tag("flags/#{locale}.png", :size => '16x11'),
edit_admin_page_url(page, :switch_locale => locale),
:class => 'locale' %>
@@ -27,10 +27,10 @@
:method => :delete if page.deletable? %>
</span>
</div>
<ul class='nested'>
<%= render :partial => 'page',
- :collection => collection.select{|p| p.parent_id == page.id},
+ :collection => page.children,
:locals => {
:collection => collection
} if page.has_descendants? %>
</ul>
</li>