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

Corrects problem calling show_link with bad value #4324

Merged
merged 1 commit into from Sep 21, 2015

Conversation

petrblaho
Copy link

show_link method assumes its first parameter to be ActiveRecord instance

  • it calls .id on it.
    When show_link method was introduced in
    52458a6
    @record.id was used as it was used to generate url for link before.
    This patch corrects that. Without it MIQ generates error when user is
    trying to view page like /ems_infra/show/1?display=timeline

@martinpovolny
Copy link

@petrblaho : Thx for the fix.

Can you, please, provide a simple test here? Just check that for given ID the page renders the partial and sends a 200. Just post/get /ems_infra/show/#{ID}?display=timeline and that's it.

Thx!

show_link method assumes its first parameter to be ActiveRecord instance
- it calls .id on it.
When show_link method was introduced in
52458a6
@record.id was used as it was used to generate url for link before.
This patch corrects that. Without it MIQ generates error when user is
trying to view page like /ems_infra/show/1?display=timeline
@miq-bot
Copy link
Member

miq-bot commented Sep 18, 2015

Checked commit petrblaho@aa73af2 with ruby 1.9.3, rubocop 0.33.0, and haml-lint 0.13.0
2 files checked, 0 offenses detected
Everything looks good. 🍪

dclarizio pushed a commit that referenced this pull request Sep 21, 2015
Corrects problem calling show_link with bad value
@dclarizio dclarizio merged commit 4f146df into ManageIQ:master Sep 21, 2015
@dclarizio dclarizio added this to the Sprint 30 Ending Oct 5, 2015 milestone Sep 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants