【问题标题】:Simple Rails 3.2 app + RefineryCMS + devise简单的 Rails 3.2 应用程序 + RefineryCMS + 设计
【发布时间】:2013-01-27 16:59:19
【问题描述】:

我有一个简单的 Rails 3.2 应用程序,后来按照官方指南 (http://refinerycms.com/guides/with-an-existing-rails-app) 添加了 RefineryCMS。现在我想向 Rails 应用程序添加设计,以限制基于登录用户的公共内容。

我知道有一个官方的 RefineryCMS 指南关于将 RefineryCMS 添加到现有的 Rails 应用程序 + 设计 (http://refinerycms.com/guides/with-an-existing-rails-31-devise-app),但我的情况不同,因为我现在要添加设计。我需要记住的任何具体步骤。如果有人可以指点我一个教程,那就太好了。谢谢。

【问题讨论】:

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


    【解决方案1】:

    我按照指南http://refinerycms.com/guides/with-an-existing-rails-31-devise-app 中的程序进行操作。

    有错误

    • 未定义的方法“new_refinery_user_registeration_path”和刷新
    • 未初始化常量 Refinery::Role

    为此,我必须在用户模型中将 ::Refinery::Role 替换为 ::Role 并覆盖refinery_user_required?刚刚安装?在 lib/refinery/refinery_patch.rb 中

    def refinery_user_required?
      false
    end
    
    def just_installed?
     false
    end
    

    【讨论】:

    • 这个实现是特定于我的开发环境的。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-08
    • 1970-01-01
    相关资源
    最近更新 更多