mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-03 11:30:15 +01:00
move to strong_parameters of rails4.
This commit is contained in:
parent
049296fd33
commit
671f64b419
24 changed files with 153 additions and 61 deletions
|
|
@ -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?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue