set activerecord whitelist_attributes to true

This commit is contained in:
Nihad Abbasov 2012-09-26 11:17:17 -07:00
parent 4629cc44d6
commit 83efcabc82
28 changed files with 100 additions and 44 deletions

View file

@ -4,6 +4,9 @@ class MergeRequest < ActiveRecord::Base
include IssueCommonality
include Votes
attr_accessible :title, :assignee_id, :closed, :target_branch, :source_branch,
:author_id_of_changes
BROKEN_DIFF = "--broken-diff"
UNCHECKED = 1
@ -48,7 +51,8 @@ class MergeRequest < ActiveRecord::Base
end
def mark_as_unchecked
self.update_attributes(state: UNCHECKED)
self.state = UNCHECKED
self.save
end
def can_be_merged?