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

Fixes #9836 - use provider type in host helpers #2247

Closed
wants to merge 1 commit into from
Closed

Fixes #9836 - use provider type in host helpers #2247

wants to merge 1 commit into from

Conversation

tstrachota
Copy link
Member

No description provided.

@@ -7,7 +7,7 @@ module HostsHelper
def provider_partial_exist?(compute_resource, partial)
return false unless compute_resource

compute_resource_name = compute_resource.provider_friendly_name.downcase
compute_resource_name = compute_resource.provider.downcase
real_path = File.join(Rails.root, 'app', 'views', 'compute_resources_vms', 'form', compute_resource_name, "_#{partial}.html.erb")
Copy link
Contributor

Choose a reason for hiding this comment

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

Side note, this doesn't look plugin-friendly, as it's referencing Rails.root rather than a search path.

@dLobatog
Copy link
Member

@tstrachota 👍 from my side, can you take a look at @domcleal 's comment if possible? Ready to merge in my opinion.

@tstrachota
Copy link
Member Author

@domcleal @elobato it's a valid note, I'll update the patch to take plugins into consideration.

@dLobatog
Copy link
Member

Merged as c2f60b5, thanks @tstrachota !

@dLobatog dLobatog closed this Mar 24, 2015
@tstrachota tstrachota deleted the 9836_provider_friendly_name branch July 14, 2015 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants