app/controllers/qbrick/cms/admins_controller.rb in qbrick-2.6.9 vs app/controllers/qbrick/cms/admins_controller.rb in qbrick-2.6.10
- old
+ new
@@ -4,31 +4,31 @@
before_action :set_admin, only: [:show, :edit, :update, :destroy]
# GET /admins
# GET /admins.json
def index
- @admins = Admin.all
+ @admins = Qbrick::Admin.all
end
# GET /admins/1
# GET /admins/1.json
def show
end
# GET /admins/new
def new
- @admin = Admin.new
+ @admin = Qbrick::Admin.new
end
# GET /admins/1/edit
def edit
end
# POST /admins
# POST /admins.json
def create
- @admin = Admin.new(admin_params)
+ @admin = Qbrick::Admin.new(admin_params)
respond_to do |format|
if @admin.save
format.html { redirect_to cms_admins_path, notice: 'Admin was successfully created.' }
format.json { render :show, status: :created, location: @admin }
@@ -65,10 +65,10 @@
private
# Use callbacks to share common setup or constraints between actions.
def set_admin
- @admin = Admin.find(params[:id])
+ @admin = Qbrick::Admin.find params[:id]
end
# Never trust parameters from the scary internet, only allow the white list through.
def admin_params
params.require(:admin).permit(:email, :password, :password_confirmation)