move to strong_parameters of rails4.

This commit is contained in:
Reinier Balt 2013-05-27 12:44:31 +02:00
parent 049296fd33
commit 671f64b419
24 changed files with 153 additions and 61 deletions

View file

@ -40,7 +40,6 @@ class Project < ActiveRecord::Base
end
end
attr_protected :user
attr_accessor :cached_note_count
def self.null_object
@ -123,7 +122,11 @@ class Project < ActiveRecord::Base
end
def name=(value)
self[:name] = value.gsub(/\s{2,}/, " ").strip
if value
self[:name] = value.gsub(/\s{2,}/, " ").strip
else
self[:name] = nil
end
end
def new_record_before_save?