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
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class Coupon < ApplicationRecord
|
class Coupon < ApplicationRecord
|
||||||
attr_accessible \
|
# attr_accessible \
|
||||||
:name,
|
# :name,
|
||||||
:victim_np_id,
|
# :victim_np_id,
|
||||||
:paid, # boolean
|
# :paid, # boolean
|
||||||
:nonprofit, :nonprofit_id
|
# :nonprofit, :nonprofit_id
|
||||||
|
|
||||||
scope :unpaid, -> {where(paid: [nil,false])}
|
scope :unpaid, -> {where(paid: [nil,false])}
|
||||||
|
|
||||||
validates_presence_of :name, :nonprofit_id, :victim_np_id
|
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
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class CustomFieldMaster < ApplicationRecord
|
class CustomFieldMaster < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible \
|
# attr_accessible \
|
||||||
:nonprofit, :nonprofit_id,
|
# :nonprofit, :nonprofit_id,
|
||||||
:name,
|
# :name,
|
||||||
:deleted,
|
# :deleted,
|
||||||
:created_at
|
# :created_at
|
||||||
|
|
||||||
validates :name, presence: true
|
validates :name, presence: true
|
||||||
validate :no_dupes, on: :create
|
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
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class DirectDebitDetail < ApplicationRecord
|
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 :donations
|
||||||
has_many :charges
|
has_many :charges
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class EmailList < ApplicationRecord
|
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 :nonprofit
|
||||||
belongs_to :tag_master
|
belongs_to :tag_master
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
class Export < ApplicationRecord
|
class Export < ApplicationRecord
|
||||||
|
|
||||||
STATUS = %w[queued started completed failed].freeze
|
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 :nonprofit
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class OffsitePayment < ApplicationRecord
|
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 :payment, dependent: :destroy
|
||||||
belongs_to :donation
|
belongs_to :donation
|
||||||
belongs_to :nonprofit
|
belongs_to :nonprofit
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class PaymentImport < ApplicationRecord
|
class PaymentImport < ApplicationRecord
|
||||||
attr_accessible :nonprofit, :user
|
# attr_accessible :nonprofit, :user
|
||||||
has_and_belongs_to_many :donations
|
has_and_belongs_to_many :donations
|
||||||
belongs_to :nonprofit
|
belongs_to :nonprofit
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class SourceToken < ApplicationRecord
|
class SourceToken < ApplicationRecord
|
||||||
self.primary_key = :token
|
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 :tokenizable, :polymorphic => true
|
||||||
belongs_to :event
|
belongs_to :event
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class Ticket < ApplicationRecord
|
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 :event_discount
|
||||||
belongs_to :supporter
|
belongs_to :supporter
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class Tracking < ApplicationRecord
|
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
|
belongs_to :donation
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue