在开发模式下正常,在生产模式下提示我没有 photo_url 方法 是不是应该在配置文件下写些什么。
Started GET "/" for 127.0.0.1 at 2012-09-05 22:04:35 +0800
Processing by HomeController#index as HTML
Rendered home/index.html.erb within layouts/application (101.1ms)
Completed 500 Internal Server Error in 186ms
ActionView::Template::Error (undefined method `photo_url' for nil:NilClass):
13: <% @topics.each do |topic| %>
14: <div class="feed-list">
15: <div class="list-single">
16: <div class="list-face"><%= link_to image_tag(topic.user.photo_url(:thumb))
17: <div class="list-content">
18: <div class="user-title">
19: <div class="user-name"><%= link_to topic.title, topic_path(topi
app/views/home/index.html.erb:16:in `block in _app_views_home_index_html_erb__317338617_80589530'
app/views/home/index.html.erb:13:in `_app_views_home_index_html_erb__317338617_80589530'