Remove attr_accessible from Program and Cfp, final fixes after introducing strong params

This commit is contained in:
Stella Rouzi 2016-01-13 14:15:12 +02:00 committed by Henne Vogelsang
parent 62a7e724a2
commit a0d045e156
8 changed files with 95 additions and 105 deletions

View file

@ -36,10 +36,6 @@ class Program < ActiveRecord::Base
accepts_nested_attributes_for :tracks, reject_if: proc { |r| r['name'].blank? }, allow_destroy: true
accepts_nested_attributes_for :difficulty_levels, allow_destroy: true
attr_accessible :schedule_fluid, :rating,
:schedule_public, :include_cfp_in_splash, :conference_id,
:event_types_attributes, :difficulty_levels_attributes, :tracks_attributes
# validates :conference_id, presence: true, uniqueness: true
validates :rating, numericality: { greater_than_or_equal_to: 0, less_than_or_equal_to: 10 }