resolve/refinerycms — Issue #1414: Error with the translations when listing engine items using i18n (2.0.1)
Author: MadWagon
Created: 2012-03-06 09:54:59+00:00
State: open

I get this error when I click on the my engine tab in the admin area :

ActionView::Template::Error (undefined method `title' for #):
5: <% if Refinery.i18n_enabled? and Refinery::I18n.frontend_locales.many? %>
6:
7: <% site.translations.each do |translation| %>
8: <% if translation.title.present? %>
9: <%= link_to refinery_icon_tag("flags/#{translation.locale}.png", :size => '16x11'),
10: refinery.edit_sites_admin_site_path(site, :switch_locale => translation.locale),
11: :class => 'locale' %>

My engine name is Site

It was created with this command :
rails generate refinery:engine site name:string published:boolean --i18n name
For some reason, the view is looking for the attribute title.

And I do have this generated line in the controller :

crudify :'refinery/sites/site',
:title_attribute => 'name', :xhr_paging => true