Skip to content

Commit

Permalink
Removed first and last name. Using full_name_or_username instead of f…
Browse files Browse the repository at this point in the history
…ull_name everywhere now
  • Loading branch information
gabceb committed Feb 26, 2013
1 parent b3fd34d commit b367ccf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions app/models/user.rb
Expand Up @@ -13,10 +13,7 @@ class User < ActiveRecord::Base
after_destroy :ensure_at_least_one_admin

validates :username, :presence => true, :uniqueness => true
validates :first_name, :presence => true
validates :last_name, :presence => true


# Kandan.devise_modules is defined in config/initializers/kandan.rb
devise devise *Kandan.devise_modules

Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/admin/_user_table.html.erb
Expand Up @@ -13,7 +13,7 @@
</thead>
<tbody>
<% users.each do |user| %>
<tr class="<%= cycle('odd', 'even')%>" data-user-id="<%= user.id%>" data-full-name="<%= user.full_name %>">
<tr class="<%= cycle('odd', 'even')%>" data-user-id="<%= user.id%>" data-full-name="<%= user.full_name_or_username %>">
<td class="username">
<%= user.username %>
</td>
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/kandan.rake
Expand Up @@ -121,7 +121,7 @@ namespace :kandan do
user.is_admin = true
user.save!

puts "Done. #{user.full_name} is now admin!"
puts "Done. #{user.full_name_or_username} is now admin!"

done = true
else
Expand Down

0 comments on commit b367ccf

Please sign in to comment.