Browse files

select -> collection_select in users#show

  • Loading branch information...
1 parent e2f65cd commit 51a639bfb2670d2bc64de2852690114425f9be6a @dimko dimko committed May 10, 2011
Showing with 4 additions and 5 deletions.
  1. +4 −5 app/views/users/show.html.erb
View
9 app/views/users/show.html.erb
@@ -6,7 +6,7 @@
<%= form_for @user.moderatorships.build do |f| %>
<h6><%= I18n.t 'txt.admin.admin_and_moderation', :default => 'Admin & Moderation' %></h6>
- <% unless @user.forums.empty? %>
+ <% if @user.forums.present? %>
<p><%= I18n.t 'txt.admin.remove_moderated_forum', :default => 'This user can moderate the following forums. Click one to remove.' %></p>
@@ -19,10 +19,10 @@
</ul>
<% end %>
- <% unless @user.available_forums.empty? %>
+ <% if @user.available_forums.present? %>
<p>
<label><%= I18n.t 'txt.admin.add_as_moderator', :default => 'Add as moderator' %></label><br />
- <%= f.select :forum_id, @user.available_forums.collect { |forum| [forum.name, forum.id] }, :include_blank => " - " %>
+ <%= f.collection_select :forum_id, @user.available_forums, :id, :name, :include_blank => " - " %>
</p>
<p>
<%= f.submit I18n.t 'txt.save', :default => 'Save' %>
@@ -35,15 +35,14 @@
<% else %>
<p><%= I18n.t 'txt.admin.user_account_is_suspended', :default => "User account is suspended" %>. <%= link_to I18n.t('txt.admin.unsuspend_user_account', :default => "Unsuspend user account"), unsuspend_user_path(@user), :method => :put %></p>
-
<% end %>
<p><%= link_to I18n.t('txt.admin.edit_user_account', :default => "Edit user account"), edit_user_path(@user) %></p>
<% end %>
<% end %>
<p style="float:right;"><%= avatar_for @user, 80 %></p>
-<h1><%= @user.display_name %> </h1>
+<h1><%= @user.display_name %></h1>
<p class="subtitle">
<%= feed_icon_tag @user.display_name, user_posts_path(:user_id => @user, :format => :rss) %>

0 comments on commit 51a639b

Please sign in to comment.