Sha256: 4f62b92cf9612ce845d3d47c5bf19ab6e4a4ae1a4c6e49a4c8528cfa16c9dce9

Contents?: true

Size: 763 Bytes

Versions: 20

Compression:

Stored size: 763 Bytes

Contents

class ActiveadminSettings::AdminUsersController < ApplicationController
  before_filter :authenticate_admin_user!

  def update
    @object = AdminUser.find(params[:id])
    if @object.update_attributes(params[:admin_user])
      render :text => "ok"
    else
      render :text => @object.errors.to_json, :status => :unprocessable_entity
    end
  end

  def create
    @object = AdminUser.new(params[:admin_user])
    if @object.save
      render :partial => "admin/settings/admin", :locals => {:admin => @object}, :layout => false
    else
      render :text => @object.errors.to_json, :status => :unprocessable_entity
    end
  end

  def destroy
    @object = AdminUser.find(params[:id])
    @object.destroy
    redirect_to "/admin/settings#admins"
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
activeadmin-settings-0.4.4 app/controllers/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.4.3 app/controllers/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.4.2 app/controllers/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.4.1 app/controllers/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.4.0 app/controllers/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.3.5 app/controllers/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.3.4 app/controllers/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.3.3 app/controllers/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.3.2 app/controllers/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.3.1 app/controllers/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.3.0 app/controllers/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.2.9 app/controllers/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.2.8 app/controllers/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.2.7 app/controllers/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.2.6 app/controller/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.2.5 app/controller/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.2.4 app/controller/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.2.3 app/controller/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.2.2 app/controller/activeadmin_settings/admin_users_controller.rb
activeadmin-settings-0.2.1 app/controller/activeadmin_settings/admin_users_controller.rb