Skip to content

Commit

Permalink
Removed double call to attr_accessible in OptionType
Browse files Browse the repository at this point in the history
  • Loading branch information
radar committed Jul 4, 2012
1 parent dee278f commit 1f93768
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/app/models/spree/option_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ class OptionType < ActiveRecord::Base
has_many :product_option_types, :dependent => :destroy
has_and_belongs_to_many :prototypes, :join_table => 'spree_option_types_prototypes'

attr_accessible :name, :presentation
attr_accessible :name, :presentation, :option_values_attributes

validates :name, :presentation, :presence => true
default_scope :order => "#{self.table_name}.position"

attr_accessible :option_values_attributes

accepts_nested_attributes_for :option_values, :reject_if => lambda { |ov| ov[:name].blank? || ov[:presentation].blank? }, :allow_destroy => true
end
end

0 comments on commit 1f93768

Please sign in to comment.