Remove protected_attributes gem
We do not enforce the rules, so removing it and switching the existing annotations to strong_parameters does not make our situation worse.
This commit is contained in:
parent
9fc51bdce8
commit
39aff78f11
8 changed files with 32 additions and 29 deletions
|
|
@ -10,10 +10,6 @@ class Supplier < ApplicationRecord
|
|||
has_many :invoices
|
||||
belongs_to :shared_supplier # for the sharedLists-App
|
||||
|
||||
include ActiveModel::MassAssignmentSecurity
|
||||
attr_accessible :name, :address, :phone, :phone2, :fax, :email, :url, :contact_person, :customer_number, :iban, :custom_fields,
|
||||
:delivery_days, :order_howto, :note, :shared_supplier_id, :min_order_quantity, :shared_sync_method
|
||||
|
||||
validates :name, :presence => true, :length => { :in => 4..30 }
|
||||
validates :phone, :presence => true, :length => { :in => 8..25 }
|
||||
validates :address, :presence => true, :length => { :in => 8..50 }
|
||||
|
|
|
|||
|
|
@ -11,10 +11,6 @@ class Task < ApplicationRecord
|
|||
|
||||
attr_accessor :current_user_id
|
||||
|
||||
# form will send user in string. responsibilities will added later
|
||||
include ActiveModel::MassAssignmentSecurity
|
||||
attr_protected :users
|
||||
|
||||
validates :name, :presence => true, :length => { :minimum => 3 }
|
||||
validates :required_users, :presence => true
|
||||
validates_numericality_of :duration, :required_users, :only_integer => true, :greater_than => 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue