为了新手友好需要自己做站内搜索了,有条件翻墙的还是应该把 google 放进翻墙列表。
不要用这个 helper
update_attributes or update_attribute
主要是 bug 和安全漏洞修复。
Update 操作加 multi 参数就可以批量了 http://www.mongodb.org/display/DOCS/Updating?focusedCommentId=3047922#Updating-update%28%29
可能只在启动时候计算?
这样做是不对的。
class Topic
belongs_to :node
end
class Article
belongs_to :node
end
class Node
has_many :topics
has_many :articles
end
没什么问题啊?
用片段缓存,不要写到数据库
看好
create 和 upadate 成功以后应该是 redirect,不然用户刷新页面就重复提交了。
不过我也觉得 respond_with 怪怪的,还是用 respond_to
#56 楼 @tiseheaini 有个帐号发了 180+ 楼的 spam,我给清了。
结论是:Ubuntu 环境下比较容易安装
Topic.select(:user_id).group(:user_id).order("count(user_id) DESC")
电脑没装 MySQL 没验证过。