rake db:migrate

This commit is contained in:
sw 2014-06-12 14:43:51 +08:00
parent 29fa624e9d
commit d832a5eecf
3 changed files with 7 additions and 8 deletions

View File

@ -156,6 +156,7 @@ class HomeworkAttachController < ApplicationController
#获取可选成员列表
#homework作业
#users该作业所有成员
#q:模糊匹配的用户的昵称
def members_for_homework homework,users,q
homework.bid.courses.first.members.joins(:member_roles).where("member_roles.role_id IN (:role_id) and user_id not in (:users)", {:role_id => [5, 10],:users => users}).joins(:user).where("users.login like '%#{q}%'")
end

View File

@ -49,7 +49,7 @@
</td>
</tr>
<tr>
<td style="padding-left: 40px">平均评分:
<td style=" padding-left: 40px">平均评分:
<%= rating_for @homework, :static => true, dimension: :quality, class: 'rateable div_inline' %>
</td>
<td>发布时间:<%=format_time @homework.created_at %></td>

View File

@ -924,13 +924,11 @@ ActiveRecord::Schema.define(:version => 20140609061903) do
add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id"
create_table "user_scores", :force => true do |t|
t.integer "user_id", :null => false
t.integer "collaboration"
t.integer "influence"
t.integer "skill"
t.integer "active"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "user_id"
t.integer "collaboration"
t.integer "influence"
t.integer "skill"
t.integer "activity"
end
create_table "user_statuses", :force => true do |t|