问题标签 [refinery]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
75 浏览

ruby-on-rails - 通过 API 调用显示炼油厂中的数据

我正在使用Refinery CMS版本 2。我想通过Api call来自另一个项目的数据来显示数据。我想知道有多少炼油厂支持这个以及如何支持。我也想为不同的页面使用不同的菜单,那么我应该怎么做?我已经使用了refinerycms-menugem,但是这些菜单显示在所有页面中。如何限制特定页面的特定菜单?

0 投票
2 回答
729 浏览

ruby-on-rails - 对未定义方法“attr_accessible”的大规模安全分配

我正在使用 Rails 3.2.13 和 Refinery with Inquiries gem。我需要在 Inquiries gem 提供的联系表中添加一个字段;但是,我收到此错误

我已阅读不要禁用 application.rb 中的白名单。所以我做了

它仍然没有工作。所以我尝试继续并将 attr_accessible 添加到

/config/initializers/refinery/inquiries.rb

但现在我得到了这个错误

/config/initializers/refinery/inquiries.rb:7:in <top (required)>': undefined methodattr_accessible' for main:Object (NoMethodError)

我只需要让这个表单域工作。任何提示!?请!?

0 投票
1 回答
478 浏览

ruby-on-rails - 从所有页面隐藏页面标题,refinerycms

我正在使用refinerycms 2.1.0. 我如何"Company name"从所有页面中删除页面标题,
我覆盖了主页,然后通过:hide_sections =>:body_content_title 来呈现
“/refinery/content_page”。但它不起作用。

Refinery CMS 的主要维护者之一来自 guides,他说:

在您包含的模板中添加一个 content_for :body_content_title 块。只需将其设为空白并通过传递 :locals => {:hide_sections => [:body_content_title]} 告诉 _content_page 部分隐藏空白部分。

0 投票
0 回答
72 浏览

ruby-on-rails - PG::Error - Refinery CMS - 博客文章创建错误

每当我尝试创建新的博客文章时都会收到错误消息。我正在运行安装了博客 gem 的炼油厂 2.1。我最近从 2.0 升级并迁移并植入了数据库。我的日志中出现 PG 约束错误。

它托管在heroku上。任何建议或帮助将不胜感激

0 投票
1 回答
157 浏览

ruby-on-rails - 无法将 itemprop 属性实现到 Refinery CMS - Rails 4

如果您熟悉 Refinery CMS(Rails 的 CMS),我无法制作 schema.org 属性。

我打开一个页面,进行编辑,然后声明:

结果如下:

有谁知道在炼油厂不删除它们的情况下保留模式的方法?

0 投票
1 回答
60 浏览

ruby-on-rails - 缓存具有条件输出的方法

我有一个方法用于在每个页面上呈现新闻文章。如果您不在护理主页上,则它不会向该主页呈现特定新闻。处理每一个页面请求是一件相当繁重的事情。我想知道是否有人能想出一个缓存它的好方法。

这是视图模板 - http://pastebin.com/BAmgSZia

我已经尝试对它进行片段缓存,但后来我意识到如果它过期并且第一个请求是疗养院的请求,那么新闻文章将被错误地填充。

0 投票
1 回答
128 浏览

ruby-on-rails - 使用 RefineryCMS 进行模型验证

由于自定义验证,控制器中不断出现语法错误。想知道我将如何在 Refinery 中实现自定义验证。

错误

报价单.rb

0 投票
0 回答
42 浏览

ruby-on-rails - Is there any way to get the images from a Refinery CMS account using API

I am using Refinery CMS for content management system. I have the images and pages-images plugin. Is there a way to access images or pagesimages of a user account using REST API?

Thanks! Satya

0 投票
1 回答
130 浏览

ruby-on-rails - Why can't I access my Refinery CMS route?

I have the following routes in Refinery:

However, when I try to access that route, it gives an error.

Here is part of routes.rb

Rails 3.2.14, Refinery 2.1.1.

0 投票
4 回答
1135 浏览

ruby-on-rails - 如何将自定义路线添加到炼油厂cms

我需要为refinerycms 项目添加一个自定义路径,我是这样做的:

现在'rake routes'可以打印正确的路线,但我无法通过refinery.news_view_more_path引用该路径,但是我在refinerycms gem源代码中找到了一些类似'refinery.news_item_path'的代码,我希望我的自定义路线可以参考方式。

谢谢 !