chore(models): comment out attr_accessible
Needs to be changed to strong params in controllers of each model.
This commit is contained in:
parent
84f8a583ba
commit
df29d446ae
10 changed files with 19 additions and 19 deletions
|
@ -1,12 +1,12 @@
|
|||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||
class Coupon < ApplicationRecord
|
||||
attr_accessible \
|
||||
:name,
|
||||
:victim_np_id,
|
||||
:paid, # boolean
|
||||
:nonprofit, :nonprofit_id
|
||||
# attr_accessible \
|
||||
# :name,
|
||||
# :victim_np_id,
|
||||
# :paid, # boolean
|
||||
# :nonprofit, :nonprofit_id
|
||||
|
||||
scope :unpaid, -> {where(paid: [nil,false])}
|
||||
|
||||
validates_presence_of :name, :nonprofit_id, :victim_np_id
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||
class CustomFieldMaster < ApplicationRecord
|
||||
|
||||
attr_accessible \
|
||||
:nonprofit, :nonprofit_id,
|
||||
:name,
|
||||
:deleted,
|
||||
:created_at
|
||||
# attr_accessible \
|
||||
# :nonprofit, :nonprofit_id,
|
||||
# :name,
|
||||
# :deleted,
|
||||
# :created_at
|
||||
|
||||
validates :name, presence: true
|
||||
validate :no_dupes, on: :create
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||
class DirectDebitDetail < ApplicationRecord
|
||||
attr_accessible :iban, :account_holder_name, :bic, :supporter_id, :holder
|
||||
# attr_accessible :iban, :account_holder_name, :bic, :supporter_id, :holder
|
||||
|
||||
has_many :donations
|
||||
has_many :charges
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||
class EmailList < ApplicationRecord
|
||||
attr_accessible :list_name, :mailchimp_list_id, :nonprofit, :tag_master
|
||||
# attr_accessible :list_name, :mailchimp_list_id, :nonprofit, :tag_master
|
||||
belongs_to :nonprofit
|
||||
belongs_to :tag_master
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
class Export < ApplicationRecord
|
||||
|
||||
STATUS = %w[queued started completed failed].freeze
|
||||
attr_accessible :exception, :nonprofit, :status, :user, :export_type, :parameters, :ended, :url, :user_id, :nonprofit_id
|
||||
# attr_accessible :exception, :nonprofit, :status, :user, :export_type, :parameters, :ended, :url, :user_id, :nonprofit_id
|
||||
|
||||
belongs_to :nonprofit
|
||||
belongs_to :user
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||
class OffsitePayment < ApplicationRecord
|
||||
|
||||
attr_accessible :gross_amount, :kind, :date, :check_number
|
||||
# attr_accessible :gross_amount, :kind, :date, :check_number
|
||||
belongs_to :payment, dependent: :destroy
|
||||
belongs_to :donation
|
||||
belongs_to :nonprofit
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||
class PaymentImport < ApplicationRecord
|
||||
attr_accessible :nonprofit, :user
|
||||
# attr_accessible :nonprofit, :user
|
||||
has_and_belongs_to_many :donations
|
||||
belongs_to :nonprofit
|
||||
belongs_to :user
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||
class SourceToken < ApplicationRecord
|
||||
self.primary_key = :token
|
||||
attr_accessible :expiration, :token, :max_uses, :total_uses
|
||||
# attr_accessible :expiration, :token, :max_uses, :total_uses
|
||||
belongs_to :tokenizable, :polymorphic => true
|
||||
belongs_to :event
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||
class Ticket < ApplicationRecord
|
||||
|
||||
attr_accessible :note, :event_discount, :event_discount_id
|
||||
# attr_accessible :note, :event_discount, :event_discount_id
|
||||
|
||||
belongs_to :event_discount
|
||||
belongs_to :supporter
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||
class Tracking < ApplicationRecord
|
||||
attr_accessible :utm_campaign, :utm_content, :utm_medium, :utm_source
|
||||
# attr_accessible :utm_campaign, :utm_content, :utm_medium, :utm_source
|
||||
|
||||
belongs_to :donation
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue