helpers APIHelpers
这句也报错,说参数错误,1 for 0
@chunlea 发现问题所在,原来 grape 取消了 fronter 分支
大家没遇到过?
@cqpx 是循环任务,不过要在后台运行,因为执行时间长,是个爬虫,whenever 没后台执行吧?!如果把他写在配置文件里呢?应该怎么写?
clear_leaderboards_moderator:
every: ["30s", :first_in => '120s']
class: CheckDaemon
queue: daemons
description: "This job will check Daemon every 30 seconds after 120 seconds after start"
@Rei 哦,明白
@woaigithub 原来的 render_list 这样用,只是简单的生成
<li><a></a></li>
我现在想生成
<li><a><div></div></a></li>
应该要怎么写!
@woaigithub 原来只是简单在 li 里面加一个 a,我还是在 a 里面加一些 div 之类
@Rei topic 的 node 和 a 的 node 是不一样的,就是一个 node 里面只能是 topic or article
@poshboytl 一直想问问,c4r 那个编辑器是哪个编辑器?开源?地址?
@ehao 好像没有这个,ruby-china 也没有。我发觉 stylesheet_link_tag 生成的代码就错误了,按理应是生成
/assets/topics-9d788fce7ba54764092b3a011aa754eb.css"
这样,有一个 assets,但是我生成的就没 assets,直接 stylesheet
@huacnlee 真快,感谢!但是浏览器查看 HTML 源代码,还是没变化
<link href="/stylesheets/front.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/accounts.css" media="screen" rel="stylesheet" type="text/css" />
还有其他影响这里的设置吗?
# coding: utf-8
RubyChina::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
# The production environment is meant for finished, "live" apps.
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Specifies the header that your server uses for sending files
config.action_dispatch.x_sendfile_header = "X-Sendfile"
# For nginx:
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
# If you have no front-end server that supports something like X-Sendfile,
# just comment this out and Rails will serve the files
# Use a different logger for distributed setups
# config.logger = Logger.new("#{Rails.root}/log/#{Rails.env}.log", 'weekly')
# config.logger.level = Logger::INFO
# Use a different cache store in production
# config.cache_store = :mem_cache_store
config.cache_store = [:dalli_store,"127.0.0.1", {:namespace => "rb-cn", :compression => true}]
# Disable Rails's static asset server
# In production, Apache or nginx will already do this
config.serve_static_assets = true
# Enable serving of images, stylesheets, and javascripts from an asset server
config.action_controller.asset_host = Setting.upload_url
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = { :host => Setting.domain }
config.action_mailer.delivery_method = :sendmail
# Enable threaded mode
# config.threadsafe!
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
# Generate digests for assets URLs
config.assets.digest = true
config.assets.js_compressor = :uglifier
config.assets.css_compressor = :scss
config.assets.precompile += %w(application.css app.js topics.css topics.js window.css front.css cpanel.css search.css
users.css pages.css pages.js notifications.js notifications.css sites.css sites.js notes.css notes.js
gfdynamicfeedcontrol.css gfdynamicfeedcontrol.js mobile.css home.css)
end
@huacnlee 已经改了,但是还是不行,部署时是否要 cap deploy production?还是 cap deploy staging 也行的的?
Gupiao::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = true
# Compress JavaScripts and CSS
config.assets.compress = false
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
# Generate digests for assets URLs
config.assets.digest = true
config.assets.js_compressor = :closure
#config.assets.css_compressor = :scss
# Defaults to Rails.root.join("public/assets")
# config.assets.manifest = YOUR_PATH
# Specifies the header that your server uses for sending files
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# See everything in the log (default is :info)
# config.log_level = :debug
# Prepend all log lines with the following tags
# config.log_tags = [ :subdomain, :uuid ]
# Use a different logger for distributed setups
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
# Use a different cache store in production
# config.cache_store = :mem_cache_store
# Enable serving of images, stylesheets, and JavaScripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( search.js )
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
# Enable threaded mode
# config.threadsafe!
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true
config.i18n.default_locale = "zh-CN"
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
# config.active_record.auto_explain_threshold_in_seconds = 0.5
end
@qlorySpring 可以
@taojay315 是的
@suupic 解决:你想从哪个 model 获取数据,你就在那个 model 定义一个 def,把另外一个 model 的 id 作为参数传入,搜索
@metal 保存数据明白,但是保存后,在某一个场景要把中间表的数据输出,应该要怎么做才好,如果按照平常,直接就用两个 MODEL 的 ID 搜索中间表!
非 ID 数据···例如一篇文章可以由多位作者一起写,一个作者可以参与多篇文章,所以用中间表存储作者的 id 和文章的 id 作为关联,现在中间表还要存储多一项数据,就是修改的时间,现在问题就是如何获取这个时间
!!!!
@help5305fff @winnie 谢啦!
@ywencn 那如果连接 POST,上一页面的表单数据,需要怎样特殊的处理么?