small fixes
This commit is contained in:
parent
2a0a0a6241
commit
262a78f602
|
@ -2,7 +2,7 @@
|
||||||
class Admin::AskAdminsController < OrbitAdminController
|
class Admin::AskAdminsController < OrbitAdminController
|
||||||
def initialize
|
def initialize
|
||||||
super
|
super
|
||||||
@app_title = 'ask_admin'
|
@app_title = 'ask'
|
||||||
end
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
class Admin::AsksController < OrbitAdminController
|
class Admin::AsksController < OrbitAdminController
|
||||||
include Admin::AsksHelper
|
include Admin::AsksHelper
|
||||||
before_action ->(module_app = @app_title) { set_variables module_app }
|
before_action ->(module_app = @app_title) { set_variables module_app }
|
||||||
before_action :set_askquestion, only: [:edit, :destroy]
|
before_action :set_askquestion, only: [:edit, :destroy, :update]
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
super
|
super
|
||||||
|
@ -65,17 +65,15 @@ class Admin::AsksController < OrbitAdminController
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@ask_question = AskQuestion.find(params[:id])
|
|
||||||
@url = admin_ask_path(@ask_question)
|
@url = admin_ask_path(@ask_question)
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@askquestions.destroy
|
@ask_question.destroy
|
||||||
redirect_to "/admin/asks"
|
redirect_to "/admin/asks"
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
@ask_question = AskQuestion.find(params[:id])
|
|
||||||
@ask_question.update_attributes(params.require(:ask_question).permit!)
|
@ask_question.update_attributes(params.require(:ask_question).permit!)
|
||||||
if @ask_question.send_email?
|
if @ask_question.send_email?
|
||||||
build_email(@ask_question)
|
build_email(@ask_question)
|
||||||
|
@ -149,6 +147,6 @@ class Admin::AsksController < OrbitAdminController
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_askquestion
|
def set_askquestion
|
||||||
@askquestions = AskQuestion.find(params[:id])
|
@ask_question = AskQuestion.find(params[:id])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue