Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production clone #117

Closed
wants to merge 36 commits into from
Closed

Production clone #117

wants to merge 36 commits into from

Conversation

armandofox
Copy link
Owner

No description provided.

winsonwan and others added 30 commits March 9, 2024 22:52
…ion model and serve/check form params against these constants (instead of string literals)
added test for when stripe charge fails (recurring_donation record should not be created)
@armandofox armandofox closed this Sep 4, 2024
@@ -237,6 +239,10 @@ def includes_donation?
end
end

def add_recurring_donation()
@recurring_donation = @donation.build_recurring_donation(amount: 0, account_code_id: @donation.account_code_id)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [115/80]

@@ -237,6 +239,10 @@
end
end

def add_recurring_donation()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/DefWithParentheses: Omit the parentheses in defs when the method doesn't accept any arguments.

@@ -5,11 +5,13 @@
has_many :items, :autosave => true, :dependent => :destroy
has_many :vouchers, :autosave => true, :dependent => :destroy
has_many :donations, :autosave => true, :dependent => :destroy
has_many :recurring_donations, :autosave => true, :dependent => :destroy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/HashSyntax: Use the new Ruby 1.9 hash syntax.

@@ -47,6 +47,14 @@
= text_field_tag 'donation', @amount, :type => :number, :class => 'text-right form-control form-control-sm'
.input-group-append
%span.input-group-text.form-control-sm .00
- if Option.allow_recurring_donations
.form-group.form-row{id:"donation_frequency_radio"}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace

= radio_button_tag :donation_frequency, Donation::ONE_TIME_DONATION, Option.default_donation_frequency == Donation::ONE_TIME_DONATION, class: 'form-control', id: Donation::ONE_TIME_DONATION
= label_tag :donation_frequency, Donation::ONE_TIME_DONATION, class: 'form-control', for: Donation::ONE_TIME_DONATION
= radio_button_tag :donation_frequency, Donation::RECURRING_DONATION, Option.default_donation_frequency == Donation::RECURRING_DONATION, class: 'form-control', id: Donation::RECURRING_DONATION
= label_tag :donation_frequency, Donation::RECURRING_DONATION, class: 'form-control', for: Donation::RECURRING_DONATION
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [133/80]

@@ -233,6 +236,7 @@
add_index "orders", ["processed_by_id"], name: "index_orders_on_processed_by_id", using: :btree
add_index "orders", ["purchaser_id"], name: "index_orders_on_purchaser_id", using: :btree
add_index "orders", ["ticket_sales_import_id"], name: "index_orders_on_ticket_sales_import_id", using: :btree
<<<<<<< HEAD
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint/Syntax: unexpected token tLSHFT

t.string "state"
=======
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint/Syntax: unexpected token tEQQ

@@ -98,7 +98,10 @@
t.string "seat"
t.datetime "sold_on"
t.integer "recurring_donation_id"
<<<<<<< HEAD
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint/Syntax: unexpected token tLSHFT

@@ -1,7 +1,7 @@
class AddRecurringDonationOptionsToOptionsTable < ActiveRecord::Migration
def change
add_column :options, :allow_recurring_donations, :boolean, default: false
add_column :options, :default_donation_type, :string, default: "one"
add_column :options, :default_donation_frequency, :string, default: "One Time"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Metrics/LineLength: Line is too long. [82/80]

@order.add_donation(build(:donation, :amount => 17))
end
it 'should add recurring donation' do
@order.add_recurring_donation()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/MethodCallWithoutArgsParentheses: Do not use parentheses for method calls with no arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants