Skip to content

Commit

Permalink
Rapid fix -- <dev-user-changer> now only appears if there is a user m…
Browse files Browse the repository at this point in the history
…odel
  • Loading branch information
tslocke committed Jun 10, 2008
1 parent 0386633 commit 8589f48
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions hobo/taglibs/rapid_navigation.dryml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ but rather write your own navigation using the `<navigation>` tag -->


<def tag="dev-user-changer">
<select-menu if="&RAILS_ENV == 'development'"
first-option="Guest" options="&Hobo::User.default_user_model.all(:limit => 10).*.login"
onchange="location.href = '/dev/set_current_user?name=' + this.options[this.selectedIndex].value"
selected="#{current_user}"
class="dev-user-changer"/>
<set user="&Hobo::User.default_user_model"/>
<select-menu if="&user && RAILS_ENV == 'development'"
first-option="Guest" options="&user.all(:limit => 10).*.login"
onchange="location.href = '/dev/set_current_user?name=' + this.options[this.selectedIndex].value"
selected="#{current_user}"
class="dev-user-changer"/>
</def>

0 comments on commit 8589f48

Please sign in to comment.