style(models): normalize comments style
This commit is contained in:
parent
fa77979712
commit
c64adad9ad
25 changed files with 171 additions and 184 deletions
|
@ -2,7 +2,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 DirectDebitDetail < ApplicationRecord
|
class DirectDebitDetail < ApplicationRecord
|
||||||
# attr_accessible :iban, :account_holder_name, :bic, :supporter_id, :holder
|
# :iban,
|
||||||
|
# :account_holder_name,
|
||||||
|
# :bic,
|
||||||
|
# :supporter_id,
|
||||||
|
# :holder
|
||||||
|
|
||||||
has_many :donations
|
has_many :donations
|
||||||
has_many :charges
|
has_many :charges
|
||||||
|
|
|
@ -5,11 +5,11 @@ class Dispute < ApplicationRecord
|
||||||
Reasons = %i[unrecognized duplicate fraudulent subscription_canceled product_unacceptable product_not_received unrecognized credit_not_processed goods_services_returned_or_refused goods_services_cancelled incorrect_account_details insufficient_funds bank_cannot_process debit_not_authorized general].freeze
|
Reasons = %i[unrecognized duplicate fraudulent subscription_canceled product_unacceptable product_not_received unrecognized credit_not_processed goods_services_returned_or_refused goods_services_cancelled incorrect_account_details insufficient_funds bank_cannot_process debit_not_authorized general].freeze
|
||||||
|
|
||||||
Statuses = %i[needs_response under_review won lost lost_and_paid].freeze
|
Statuses = %i[needs_response under_review won lost lost_and_paid].freeze
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :gross_amount, # int
|
# :gross_amount, # int
|
||||||
# :charge_id, :charge,
|
# :charge_id,
|
||||||
# :payment_id, :payment,
|
# :charge,
|
||||||
|
# :payment_id,
|
||||||
|
# :payment,
|
||||||
# :status,
|
# :status,
|
||||||
# :reason
|
# :reason
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,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 EmailDraft < ApplicationRecord
|
class EmailDraft < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :nonprofit, :nonprofit_id,
|
# :nonprofit, :nonprofit_id,
|
||||||
# :name,
|
# :name,
|
||||||
# :deleted,
|
# :deleted,
|
||||||
|
|
|
@ -2,8 +2,18 @@
|
||||||
|
|
||||||
# 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 Export < ApplicationRecord
|
class Export < ApplicationRecord
|
||||||
|
# :exception,
|
||||||
|
# :nonprofit,
|
||||||
|
# :status,
|
||||||
|
# :user,
|
||||||
|
# :export_type,
|
||||||
|
# :parameters,
|
||||||
|
# :ended,
|
||||||
|
# :url,
|
||||||
|
# :user_id,
|
||||||
|
# :nonprofit_id
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
belongs_to :nonprofit
|
belongs_to :nonprofit
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
|
@ -2,8 +2,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 FullContactInfo < ApplicationRecord
|
class FullContactInfo < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :email,
|
# :email,
|
||||||
# :full_name,
|
# :full_name,
|
||||||
# :gender,
|
# :gender,
|
||||||
|
|
|
@ -2,8 +2,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 FullContactOrg < ApplicationRecord
|
class FullContactOrg < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :name,
|
# :name,
|
||||||
# :is_primary,
|
# :is_primary,
|
||||||
# :name,
|
# :name,
|
||||||
|
|
|
@ -2,8 +2,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 FullContactPhoto < ApplicationRecord
|
class FullContactPhoto < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :full_contact_info,
|
# :full_contact_info,
|
||||||
# :full_contact_info_id,
|
# :full_contact_info_id,
|
||||||
# :type_id, # i.e. twitter, linkedin, facebook
|
# :type_id, # i.e. twitter, linkedin, facebook
|
||||||
|
|
|
@ -2,8 +2,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 FullContactSocialProfile < ApplicationRecord
|
class FullContactSocialProfile < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :full_contact_info,
|
# :full_contact_info,
|
||||||
# :full_contact_info_id,
|
# :full_contact_info_id,
|
||||||
# :type_id, # i.e. twitter, linkedin, facebook
|
# :type_id, # i.e. twitter, linkedin, facebook
|
||||||
|
|
|
@ -2,8 +2,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 FullContactTopic < ApplicationRecord
|
class FullContactTopic < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :provider,
|
# :provider,
|
||||||
# :value,
|
# :value,
|
||||||
# :full_contact_info_id, :full_contact_info
|
# :full_contact_info_id, :full_contact_info
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
# 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 ImageAttachment < ApplicationRecord
|
class ImageAttachment < ApplicationRecord
|
||||||
attr_accessible :parent_id, :file
|
# :parent_id,
|
||||||
|
# :file
|
||||||
mount_uploader :file, ImageAttachmentUploader
|
mount_uploader :file, ImageAttachmentUploader
|
||||||
|
|
||||||
# not sure if poly parent is used on this model, as all values are nil in db
|
# not sure if poly parent is used on this model, as all values are nil in db
|
||||||
|
|
|
@ -2,8 +2,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 MiscellaneousNpInfo < ApplicationRecord
|
class MiscellaneousNpInfo < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :donate_again_url,
|
# :donate_again_url,
|
||||||
# :change_amount_message
|
# :change_amount_message
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,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 NonprofitAccount < ApplicationRecord
|
class NonprofitAccount < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :stripe_account_id, #str
|
# :stripe_account_id, #str
|
||||||
# :nonprofit, :nonprofit_id #int
|
# :nonprofit, :nonprofit_id #int
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,10 @@
|
||||||
|
|
||||||
# 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
|
# :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
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
# If connected to an offsite_payment, this is money the nonprofit is recording for convenience.
|
# If connected to an offsite_payment, this is money the nonprofit is recording for convenience.
|
||||||
|
|
||||||
class Payment < ApplicationRecord
|
class Payment < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :towards,
|
# :towards,
|
||||||
# :gross_amount,
|
# :gross_amount,
|
||||||
# :refund_total,
|
# :refund_total,
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
# since our fees will continue to change as our transaction volume increases
|
# since our fees will continue to change as our transaction volume increases
|
||||||
|
|
||||||
class PaymentPayout < ApplicationRecord
|
class PaymentPayout < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :payment_id, :payment,
|
# :payment_id, :payment,
|
||||||
# :charge_id, :charge, # deprecated
|
# :charge_id, :charge, # deprecated
|
||||||
# :payout_id, :payout,
|
# :payout_id, :payout,
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
# These are tied to Stripe transfers
|
# These are tied to Stripe transfers
|
||||||
|
|
||||||
class Payout < ApplicationRecord
|
class Payout < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :scheduled, # bool (whether this was made automatically at the beginning of the month)
|
# :scheduled, # bool (whether this was made automatically at the beginning of the month)
|
||||||
# :count, # int (number of donations for this payout)
|
# :count, # int (number of donations for this payout)
|
||||||
# :ach_fee, # int (in cents, the total fee for the payout itself)
|
# :ach_fee, # int (in cents, the total fee for the payout itself)
|
||||||
|
|
|
@ -3,9 +3,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 Refund < ApplicationRecord
|
class Refund < ApplicationRecord
|
||||||
Reasons = %i[duplicate fraudulent requested_by_customer].freeze
|
Reasons = %i[duplicate fraudulent requested_by_customer].freeze
|
||||||
|
|
||||||
# TODO:
|
|
||||||
# attr_accessible \
|
|
||||||
# :amount, # int
|
# :amount, # int
|
||||||
# :comment, # text
|
# :comment, # text
|
||||||
# :reason, # str ('duplicate', 'fraudulent', or 'requested_by_customer')
|
# :reason, # str ('duplicate', 'fraudulent', or 'requested_by_customer')
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
# 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
|
# :expiration,
|
||||||
|
# :token,
|
||||||
|
# :max_uses,
|
||||||
|
# :total_uses
|
||||||
belongs_to :tokenizable, polymorphic: true
|
belongs_to :tokenizable, polymorphic: true
|
||||||
belongs_to :event
|
belongs_to :event
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,8 +2,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 Supporter < ApplicationRecord
|
class Supporter < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :search_vectors,
|
# :search_vectors,
|
||||||
# :profile_id, :profile,
|
# :profile_id, :profile,
|
||||||
# :nonprofit_id, :nonprofit,
|
# :nonprofit_id, :nonprofit,
|
||||||
|
|
|
@ -2,8 +2,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 SupporterEmail < ApplicationRecord
|
class SupporterEmail < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :to,
|
# :to,
|
||||||
# :from,
|
# :from,
|
||||||
# :subject,
|
# :subject,
|
||||||
|
|
|
@ -2,8 +2,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 SupporterNote < ApplicationRecord
|
class SupporterNote < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :content,
|
# :content,
|
||||||
# :supporter_id, :supporter
|
# :supporter_id, :supporter
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,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 TagJoin < ApplicationRecord
|
class TagJoin < ApplicationRecord
|
||||||
# TODO
|
|
||||||
# attr_accessible \
|
|
||||||
# :supporter, :supporter_id,
|
# :supporter, :supporter_id,
|
||||||
# :tag_master, :tag_master_id
|
# :tag_master, :tag_master_id
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,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 TagMaster < ApplicationRecord
|
class TagMaster < ApplicationRecord
|
||||||
# TODO:
|
|
||||||
# attr_accessible \
|
|
||||||
# :nonprofit, :nonprofit_id,
|
# :nonprofit, :nonprofit_id,
|
||||||
# :name,
|
# :name,
|
||||||
# :deleted,
|
# :deleted,
|
||||||
|
|
|
@ -2,7 +2,10 @@
|
||||||
|
|
||||||
# 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
|
# :utm_campaign,
|
||||||
|
# :utm_content,
|
||||||
|
# :utm_medium,
|
||||||
|
# :utm_source
|
||||||
|
|
||||||
belongs_to :donation
|
belongs_to :donation
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,8 +2,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 User < ApplicationRecord
|
class User < ApplicationRecord
|
||||||
# TODO:
|
|
||||||
# attr_accessible \
|
|
||||||
# :email, # str: balidated with Devise
|
# :email, # str: balidated with Devise
|
||||||
# :password, # str: hashed with bcrypt
|
# :password, # str: hashed with bcrypt
|
||||||
# :phone, # str
|
# :phone, # str
|
||||||
|
|
Loading…
Reference in a new issue