Sha256: 12d9ab6d1e0e6b61e5654892b9b525787f1fd38fc00182e1a3ce2880ec11f828

Contents?: true

Size: 613 Bytes

Versions: 97

Compression:

Stored size: 613 Bytes

Contents

class Admin::UsersController < Admin::BaseController
  respond_to :html, :js
  
  def index
    @search = User.search(params[:search])
    @users = @search.page(params[:page] || 1)
  end

  def new
    @user = User.new  
  end
  
  def edit
  end
  
  def create
      @user = User.new(params[:user])
      
      if @user.respond_to?(:author)
        @user.author ||= current_user
      end
      
      @user.save
      respond_with(@user)
  end

  def update
    @user.attributes = params[:user]
    @user.save
    respond_with(@user)
  end

  def destroy
    @user.destroy
    respond_with(@user)
  end
end


Version data entries

97 entries across 97 versions & 1 rubygems

Version Path
fullstack-cms-0.4.6 app/controllers/admin/users_controller.rb
fullstack-cms-0.4.5 app/controllers/admin/users_controller.rb
fullstack-cms-0.4.4 app/controllers/admin/users_controller.rb
fullstack-cms-0.3.8.fix app/controllers/admin/users_controller.rb
fullstack-cms-0.2.32.fix app/controllers/admin/users_controller.rb
fullstack-cms-0.4.3 app/controllers/admin/users_controller.rb
fullstack-cms-0.4.2 app/controllers/admin/users_controller.rb
fullstack-cms-0.4.1 app/controllers/admin/users_controller.rb
fullstack-cms-0.3.39 app/controllers/admin/users_controller.rb
fullstack-cms-0.3.38 app/controllers/admin/users_controller.rb
fullstack-cms-0.3.37 app/controllers/admin/users_controller.rb
fullstack-cms-0.3.36 app/controllers/admin/users_controller.rb
fullstack-cms-0.3.35 app/controllers/admin/users_controller.rb
fullstack-cms-0.3.34 app/controllers/admin/users_controller.rb
fullstack-cms-0.3.33 app/controllers/admin/users_controller.rb
fullstack-cms-0.3.32 app/controllers/admin/users_controller.rb
fullstack-cms-0.3.31 app/controllers/admin/users_controller.rb
fullstack-cms-0.3.30 app/controllers/admin/users_controller.rb
fullstack-cms-0.3.29 app/controllers/admin/users_controller.rb
fullstack-cms-0.3.28 app/controllers/admin/users_controller.rb