Skip to content

Commit

Permalink
remove references to protected attributes from application.rb and see…
Browse files Browse the repository at this point in the history
…ds.rb
  • Loading branch information
armandofox committed Jan 2, 2024
1 parent 9932c3e commit ace396a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
3 changes: 0 additions & 3 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ class Application < Rails::Application

config.assets.enabled = true

# Raise exceptiosn when mass-assignment issues arise, to surface them
config.active_record.mass_assignment_sanitizer = :strict

# Add additional load paths for your own custom dirs
additional_paths = Dir.glob(File.join Rails.root, "app/models/**/*").select { |f| File.directory? f }
config.eager_load_paths += additional_paths
Expand Down
7 changes: 3 additions & 4 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ def self.create_special_customers
admin = Customer.new({:first_name => 'Super',
:last_name => 'Administrator',
:password => 'admin',
:email => '[email protected]'}, :without_protection => true)
:email => '[email protected]'})
admin.created_by_admin = true
admin.role = 100
admin.last_login = Time.current
admin.save!
end
@@special_customers.each_pair do |which, attrs|
unless Customer.find_by_role(attrs[:role])
c = Customer.new(attrs.except(:role), :without_protection => true)
c = Customer.new(attrs.except(:role))
c.role = attrs[:role]
c.created_by_admin = true
c.save!
Expand All @@ -75,8 +75,7 @@ def self.create_default_account_code
:default_retail_account_code => a.id,
:subscription_order_service_charge_account_code => a.id,
:regular_order_service_charge_account_code => a.id,
:classes_order_service_charge_account_code => a.id },
:without_protection => true)
:classes_order_service_charge_account_code => a.id } )
end

def self.create_default_seating_zone
Expand Down

0 comments on commit ace396a

Please sign in to comment.