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

dev-user-changer broken in localized apps #36

Open
haslinger opened this issue Dec 9, 2013 · 0 comments
Open

dev-user-changer broken in localized apps #36

haslinger opened this issue Dec 9, 2013 · 0 comments

Comments

@haslinger
Copy link

In case of a localized app, where you use detault url options ending ?locale=de <dev-user-changer> is broken.

So in my app I patch it according to the definition in hobo_bootstrap / taglibs / nav.dryml by exchanging ?login with &login like so

<def tag="dev-user-changer">
  <set user="&Hobo::Model::UserBase.default_user_model"/>
  <select-menu if="&user && Rails.env.development?"
               first-option="#{t('hobo.dev_user_changer.guest', {:default=>'Guest'})}" options="&user.all(:limit => 30).*.login"
               onchange="location.href = '#{dev_support_path :action=>:set_current_user}&login=' + encodeURIComponent(this.options[this.selectedIndex].value)"
               selected="#{current_user.login}"
               class="dev-user-changer"
               merge-attrs/>
</def>

I'm not sure how the general case should be handled.
Besides that minor issue, a fantastic gem!

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

No branches or pull requests

1 participant