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

Fix Plan grant_number bug #3034

Merged
merged 1 commit into from
Sep 23, 2021
Merged

Conversation

johnpinto1
Copy link
Contributor

"undefined method `grant_number' for #Plan:0x00007fd5384ec108\nDid you mean? grant_id"

Change:

  • replacing Plan grant_number by grant&.value in files.

This is a fix based on comment by @briri in a closed PR #3028 (comment)

Anyway, it looks like maybe its trying to reference grant_number in a few places. Can you update these as part of this PR when you have a chance?

Here's the output of a quick grep on the app directory:

briley@CDL-BRILEY-9M roadmap % grep -r 'grant_number' app 
app/models/exported_plan.rb:    plan.grant_number
app/models/concerns/exportable_plan.rb:    if grant_number.present?
app/models/concerns/exportable_plan.rb:      csv << [_("Grant number: "), _("%{grant_number}") % { grant_number: grant_number }]
app/javascript/src/plans/editDetails.js:              $('#grant_number_info').html(grantNumberInfo(grantId));
app/javascript/src/plans/editDetails.js:            $('#grant_number_info').html(grantNumberInfo(''));
app/views/plans/_project_details.html.erb:          <span class="text-muted" id="grant_number_info">Grant number: <%= plan.grant&.value %></span>
app/views/shared/export/_plan_txt.erb:  <% if @plan.grant_number.present? %>
app/views/shared/export/_plan_txt.erb:<%= _("Grant number: ") + @plan.grant_number %>
app/views/api/v0/statistics/plans.json.jbuilder:  json.grant_number   plan.grant_number
app/views/api/v0/plans/index.json.jbuilder:  json.grant_number   plan.grant_number

"undefined method `grant_number' for #<Plan:0x00007fd5384ec108>\nDid you mean?  grant_id"

Change:
- replacing Plan grant_number by grant&.value in files.
Copy link
Contributor

@raycarrick-ed raycarrick-ed left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Copy link
Contributor

@briri briri left a comment

Choose a reason for hiding this comment

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

looks great. Thanks for this @johnpinto1!

@briri briri merged commit dab960f into development Sep 23, 2021
@briri briri deleted the bug-496-plan-grant_number-bug-found branch September 23, 2021 14:31
portagenetwork pushed a commit to portagenetwork/roadmap that referenced this pull request Feb 24, 2022
…_number-bug-found

Fix Plan grant_number bug
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.

None yet

3 participants