空数据库时,留下的新手讨论吧、网站建议吧创建人为空,引用时加上非空判断
This commit is contained in:
parent
e99f9250c3
commit
63470476a5
|
@ -60,11 +60,13 @@
|
|||
<div style="padding-top: 20px" >
|
||||
<span class="forums-avatar-left"><%= image_tag(url_to_avatar(@forum.creator), :class =>'vatar-size') %></span>
|
||||
<span class="forums-avatar-right">
|
||||
<% unless @forum.creator.nil? %>
|
||||
<%=link_to @forum.creator.name, user_path(@forum.creator) %>
|
||||
<div>
|
||||
<%= link_to l(:label_user_watcher)+"("+User.watched_by(@forum.creator.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist", :id => @forum.creator.id %>
|
||||
<%= link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+@forum.creator.watcher_users(@forum.creator.id).count.to_s+")", :controller=>"users", :action=>"user_fanslist", :id => @forum.creator.id %>
|
||||
</div>
|
||||
<% end %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -879,7 +879,7 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
|
|||
t.integer "osp_id"
|
||||
t.integer "parent_id"
|
||||
t.string "subject", :null => false
|
||||
t.text "content", :limit => 16777215, :null => false
|
||||
t.text "content", :null => false
|
||||
t.integer "author_id"
|
||||
t.integer "replies_count", :default => 0
|
||||
t.integer "last_reply_id"
|
||||
|
@ -980,7 +980,6 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
|
|||
t.datetime "updated_at", :null => false
|
||||
t.integer "project_id"
|
||||
t.integer "user_id"
|
||||
t.string "description"
|
||||
end
|
||||
|
||||
create_table "softapplications", :force => true do |t|
|
||||
|
@ -1086,8 +1085,8 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
|
|||
t.integer "zip_code"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "technical_title"
|
||||
t.integer "identity"
|
||||
t.string "technical_title"
|
||||
t.string "student_id"
|
||||
t.string "teacher_realname"
|
||||
t.string "student_realname"
|
||||
|
@ -1145,6 +1144,9 @@ ActiveRecord::Schema.define(:version => 20140826072838) do
|
|||
t.integer "active"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.integer "level"
|
||||
t.integer "file"
|
||||
t.integer "issue"
|
||||
end
|
||||
|
||||
create_table "user_statuses", :force => true do |t|
|
||||
|
|
Loading…
Reference in New Issue