0
这是一个奇怪的问题:的Heroku雪松资产:预编译有牛肉attr_protected
- 我的一个ActiveRecord的模型使用
attr_protected
attr_protected
必须连接到数据库- On Heroku Cedar, the database is not available during slug compilation(惊喜疑难杂症!)。
解决方法:
- 使用
attr_accessible
代替 - Other people have used this workaround
有没有更好的解决办法?谢谢。
不错,为我工作。 – 2011-12-24 04:38:38
另请参阅http://devcenter.heroku.com/articles/labs-user-env-compile,以使您的env变量在slug编译时可用。 – 2011-12-24 09:19:38
@JohnBeynon谢谢,那正是我寻找的东西 – himynameisjonas 2012-01-06 15:50:10