From 14e6db457b8cbf0ded900458ae7a825d9f6eb597 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 20 Jul 2016 09:38:23 +0800 Subject: [PATCH] rake --- app/models/changeset.rb | 2 +- lib/tasks/gitlab_act_project.rake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/changeset.rb b/app/models/changeset.rb index ae1faf40a..3a772eb6b 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -57,7 +57,7 @@ class Changeset < ActiveRecord::Base validates :committed_on, presence: true validates :commit_date, presence: true validates :scmid, uniqueness: {scope: :repository_id, allow_nil: true} - attr_accessible :product + attr_accessible :product, :project_id, :repository_id, :revision, :committer, :comments, :committed_on attr_accessible :type scope :visible, lambda {|*args| diff --git a/lib/tasks/gitlab_act_project.rake b/lib/tasks/gitlab_act_project.rake index 259fdc58e..962dac221 100644 --- a/lib/tasks/gitlab_act_project.rake +++ b/lib/tasks/gitlab_act_project.rake @@ -4,7 +4,7 @@ namespace :gitlab do begin g = Gitlab.client # projects = Project.find_by_sql("select * from projects where gpid is not null") - projects = Project.find("select * from projects where gpid is not null and id != 2") + projects = Project.find_by_sql("select * from projects where gpid is not null and id != 2") projects.each do |project| g_project = g.project(project.gpid) # 获取默认分支