Skip to content

Commit

Permalink
cleanup of 2 files uncleaned in extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry Richardson authored and Jerry Richardson committed Feb 9, 2009
1 parent 53afd09 commit f952b6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
4 changes: 2 additions & 2 deletions app/controllers/users_controller.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ def edit
end end


def update def update
if current_user.admin? && params[:user][:admin] && params[:user][:admin] == "1" if signed_in_as_admin? && params[:user][:admin] && params[:user][:admin] == "1"
@user.admin = true @user.admin = true
@user.save @user.save
elsif current_user.admin? elsif signed_in_as_admin?
@user.admin = false @user.admin = false
@user.save @user.save
end end
Expand Down
14 changes: 0 additions & 14 deletions app/models/user.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,19 +1,5 @@
class User < ActiveRecord::Base class User < ActiveRecord::Base
include Clearance::App::Models::User include Clearance::App::Models::User
has_attached_file :avatar, :styles => { :medium => "256x256", :thumb => "64x64", :mini => "32x32" }, :default_url => "/images/transparent.gif"
attr_accessible :first_name, :last_name, :bio, :avatar, :location
named_scope :stars, :conditions => { :star => true }
has_many :posts

# after_create :add_jabber_user
#
#
# def add_jabber_user
# end

def full_name
"#{first_name} #{last_name}"
end


def admin? def admin?
self.admin self.admin
Expand Down

0 comments on commit f952b6e

Please sign in to comment.