[PATCH conductor] Fixes bug relating to provider account routing.

Matt Wagner matt.wagner at redhat.com
Thu Aug 16 18:26:54 UTC 2012


On Thu, Aug 16, 2012 at 11:15:07AM -0400, Scott Seago wrote:
> Since provider accounts are only accessible via a nested route, link_to(@account)
> fails without an explicit provider_account_path method.
> 
> This is a short-term hack to make the profile page work again, the real fix
> is to remove the nested route for provider accounts, since there's really
> no need for it -- just like we don't nest routes for pools, instances, etc.
> ---
>  src/app/helpers/application_helper.rb |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/src/app/helpers/application_helper.rb b/src/app/helpers/application_helper.rb
> index 6ddee96..5569071 100644
> --- a/src/app/helpers/application_helper.rb
> +++ b/src/app/helpers/application_helper.rb
> @@ -167,6 +167,11 @@ module ApplicationHelper
>      will_paginate(collection, :previous_label => t('will_paginate.previous_label'), :next_label => t('will_paginate.next_label'))
>    end
>  
> +  # FIXME: remove this once we remove nested routes for provider accounts.
> +  def provider_account_path(account)
> +    "/providers/#{account.provider_id}/provider_accounts/#{account.id}"
> +  end
> +
>    module_function :count_uptime
>  
>    class FormBuilderWithRequiredFields < ActionView::Helpers::FormBuilder
> -- 
> 1.7.6.5

ACK, will push to master and 1.1.

-- Matt



More information about the aeolus-devel mailing list