-
Notifications
You must be signed in to change notification settings - Fork 73
[Performance] Use full path for render calls #12227
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
Changes from 8 commits
a735fc7
5df441b
c7c5931
178189c
750ac43
114e33c
c82d389
faec3b3
7a0c2ca
217d240
304e592
e57193e
5543efa
95effdc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| A charge of <%= render_money @cpt.amount_cents %> at '<%= @cpt.memo %>' occurred on your card for <%= @cpt.stripe_card.event.name %> ending in <%= @cpt.stripe_card.last4 %>. | ||
|
|
||
| <%= render partial: "attach_receipt", locals: { hcb_code: @cpt.local_hcb_code, upload_url: @upload_url } %> | ||
| <%= render partial: "canonical_pending_transaction_mailer/attach_receipt", locals: { hcb_code: @cpt.local_hcb_code, upload_url: @upload_url } %> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| <%= @cpt.memo %> has settled at <%= render_money @ct.amount_cents %>; this was a charge on your card ending in <%= @cpt.stripe_card.last4 %> that previously was <%= render_money @cpt.amount_cents %>. | ||
|
|
||
| <%= render partial: "attach_receipt", locals: { hcb_code: @cpt.local_hcb_code, upload_url: @upload_url } if @cpt.local_hcb_code.missing_receipt? %> | ||
| <%= render partial: "canonical_pending_transaction_mailer/attach_receipt", locals: { hcb_code: @cpt.local_hcb_code, upload_url: @upload_url } if @cpt.local_hcb_code.missing_receipt? %> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,7 @@ | |
| <%= render partial: "card_grants/header_banner", locals: { card_grant: @card_grant, footer: } %> | ||
|
|
||
| <% if @card_grant.instructions.present? %> | ||
| <%= render "callout", title: "Instructions from #{@card_grant.event.name}", type: "info", class: "mb-4" do %> | ||
| <%= render "application/callout", title: "Instructions from #{@card_grant.event.name}", type: "info", class: "mb-4" do %> | ||
| <p class="m-0"> | ||
| <%= @card_grant.instructions %> | ||
| </p> | ||
|
|
@@ -32,32 +32,32 @@ | |
| <% if @card_grant.canceled? %> | ||
| <%= blankslate "Sorry, this grant was canceled!", class: "flex-grow" %> | ||
| <% else %> | ||
| <%= render partial: "invitation", locals: { card_grant: @card_grant } %> | ||
| <%= render partial: "card_grants/invitation", locals: { card_grant: @card_grant } %> | ||
| <% end %> | ||
| <%# Grantee has accepted invite %> | ||
| <% elsif @card_grant.user.admin? || organizer_signed_in? || @card_grant.user == current_user %> | ||
| <div class="justify-center grid grid-cols-1 <%= "md:grid-cols-2" if @card_grant.stripe_card.present? %>"> | ||
| <% if @card_grant.stripe_card %> | ||
| <div> | ||
| <%= render @card_grant.stripe_card, headless: true %> | ||
| <%= render partial: "balance", locals: { card_grant: @card_grant } %> | ||
| <%= render partial: "canceled_warning", locals: { card_grant: @card_grant } %> | ||
| <%= render partial: "actions", locals: { card_grant: @card_grant } %> | ||
| <%= render "stripe_cards/stripe_card", stripe_card: @card_grant.stripe_card, headless: true %> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is changing this necessary? If you call render on a model is there more than one place it could live?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think changing it will make it faster |
||
| <%= render partial: "card_grants/balance", locals: { card_grant: @card_grant } %> | ||
| <%= render partial: "card_grants/canceled_warning", locals: { card_grant: @card_grant } %> | ||
| <%= render partial: "card_grants/actions", locals: { card_grant: @card_grant } %> | ||
| </div> | ||
| <% end %> | ||
| <div class="flex flex-col g2"> | ||
| <% if @card_grant.stripe_card %> | ||
| <% admin_tool_if @card_grant.user != current_user do %> | ||
| <%= render partial: "card_details", locals: { card_grant: @card_grant } %> | ||
| <%= render partial: "card_grants/card_details", locals: { card_grant: @card_grant } %> | ||
| <% end %> | ||
| <% end %> | ||
| <%= render partial: "grant_details", locals: { card_grant: @card_grant } %> | ||
| <%= render partial: "card_grants/grant_details", locals: { card_grant: @card_grant } %> | ||
|
|
||
| <%= render partial: "card_grant/pre_authorizations/organizer_info", locals: { pre_authorization: @card_grant.pre_authorization, link_to_pre_authorization: true } if @card_grant.pre_authorization.present? && organizer_signed_in? %> | ||
|
|
||
| </div> | ||
| <div class="flex flex-col g2"> | ||
| <%= render partial: "canceled_warning", locals: { card_grant: @card_grant } unless @card_grant.stripe_card %> | ||
| <%= render partial: "card_grants/canceled_warning", locals: { card_grant: @card_grant } unless @card_grant.stripe_card %> | ||
| </div> | ||
| </div> | ||
| <% end %> | ||
|
|
@@ -66,7 +66,7 @@ | |
| <hr> | ||
|
|
||
| <% unless @card_grant.user == current_user && @card_grant.pending_invite? %> | ||
| <%= render partial: "transactions", locals: { hcb_codes: @hcb_codes } %> | ||
| <%= render partial: "card_grants/transactions", locals: { hcb_codes: @hcb_codes } %> | ||
| <% end %> | ||
|
|
||
| <% if policy(@card_grant.comments.build).create? %> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| <% page_sm %> | ||
| <% no_app_shell %> | ||
|
|
||
| <%= render "header" %> | ||
| <%= render "events/landing/header" %> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the correct partial but I don't understand how it was getting inferred before. From my understanding,
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this has always confused me too |
||
|
|
||
| <%= turbo_frame_tag :donation do %> | ||
| <div class="card mb3 mt3"> | ||
|
|
@@ -37,4 +37,4 @@ | |
| </div> | ||
| <% end %> | ||
|
|
||
| <%= render "footer" %> | ||
| <%= render "events/landing/footer" %> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,4 +22,4 @@ | |
| </style> | ||
| <% end %> | ||
|
|
||
| <%= render "footer" %> | ||
| <%= render "events/landing/footer" %> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <h1>New Donation</h1> | ||
|
|
||
| <%= render "form", donation: @donation %> | ||
| <%= render "donations/form", donation: @donation %> | ||
|
|
||
| <%= link_to "Back", donations_path %> |
Uh oh!
There was an error while loading. Please reload this page.