From a5aff586d6ec1f62cc48a2d6dd875734c40a4ea8 Mon Sep 17 00:00:00 2001 From: Luis Castro Date: Tue, 6 Aug 2019 14:49:40 +0200 Subject: [PATCH] style(models): remove attr_accessible comment Keep comments on model specifics. --- app/models/charge.rb | 10 ++++------ app/models/comment.rb | 9 ++++----- app/models/coupon.rb | 4 ++-- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/app/models/charge.rb b/app/models/charge.rb index d71c823a..371bbc94 100644 --- a/app/models/charge.rb +++ b/app/models/charge.rb @@ -4,12 +4,10 @@ # A Charge represents a potential debit to a nonprofit's account on a credit card donation action. class Charge < ApplicationRecord - # TODO - # attr_accessible \ - # :amount, - # :fee, - # :stripe_charge_id, - # :status + # :amount, + # :fee, + # :stripe_charge_id, + # :status has_one :campaign, through: :donation has_one :recurring_donation, through: :donation diff --git a/app/models/comment.rb b/app/models/comment.rb index 1fc75312..b2510703 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -2,11 +2,10 @@ # License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later class Comment < ApplicationRecord - # TODO - # attr_accessible \ - # :host_id, :host_type, #parent: Event, Campaign, nil - # :profile_id, - # :body + # :host_id, + # :host_type, # parent: Event, Campaign, nil + # :profile_id, + # :body validates :profile, presence: true validates :body, presence: true, length: { maximum: 200 } diff --git a/app/models/coupon.rb b/app/models/coupon.rb index 0453c9e3..1318dd94 100644 --- a/app/models/coupon.rb +++ b/app/models/coupon.rb @@ -2,11 +2,11 @@ # 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 + # :nonprofit, + # :nonprofit_id scope :unpaid, -> { where(paid: [nil, false]) }