炼油厂cms中未定义的方法'page_title_with_translations'

时间:2013-05-30 06:09:58

标签: ruby ruby-on-rails-3 refinerycms

在编辑器中点击添加链接时,我收到以下错误。

Rendered /home/amit/.rvm/gems/ruby-1.9.3-p392/gems/refinerycms-pages-2.0.10/app/views/refinery/admin/pages_dialogs/link_to.html.erb within layouts/refinery/admin_dialog (61.3ms)
Completed 500 Internal Server Error in 187ms

ActionView::Template::Error (undefined method `page_title_with_translations' for #<#<Class:0xb1672e4>:0xb5e0730>):
    11:                 :rel => page_link.title,
    12:                 :class => 'page_link'
    13:               }.merge(link_args) do %>
    14:     <%= page_title_with_translations page_link %>
    15:     <%= page_meta_information page_link %>
    16:   <% end %>
    17: </li>

环境:

ruby-1.9.3-p392
rails 3.2.13
refinerycms 2.0.10

配置/初始化/炼油厂/ i18n.rb

Refinery::I18n.configure do |config|
   config.enabled = true

   config.default_locale = :fi

   config.current_locale = :fi

   config.default_frontend_locale = :fi

   config.frontend_locales = :en, :fi

   config.locales = {:fi=>"Finish", :en=>"English"}
end

知道如何解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

我设法通过用2.0.10覆盖版本2.0.8的Refinery::Admin::PagesDialogsController来修复。

以下Refinery::Admin::PagesDialogsController已解决的问题

helper :'refinery/admin/pages'

感谢@Pigueiras和我在一起