work on controllers/views started
This commit is contained in:
@@ -1,17 +1,28 @@
|
||||
class UsersController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
def new
|
||||
@user = User.new
|
||||
end
|
||||
|
||||
def edit
|
||||
@user = User.find(params[:id])
|
||||
unless @current_user.is_admin?
|
||||
@user = @current_user
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
def show
|
||||
@user = User.find(params[:id])
|
||||
end
|
||||
|
||||
def create
|
||||
@user = User.new(params[:user])
|
||||
flash[:notice] = "You have succesfully created a new account." if @user.save
|
||||
respond_with(@user)
|
||||
end
|
||||
|
||||
def update
|
||||
|
||||
Reference in New Issue
Block a user