client_management/app/controllers/admin/site_panel_controller.rb

24 lines
495 B
Ruby
Raw Normal View History

class Admin::SitePanelController < OrbitAdminController
2017-11-30 10:49:21 +00:00
def initialize
super
@app_title = "client_management"
end
def index
@site_construct = SiteConstruct.new
end
def create
site_construct = SiteConstruct.new(site_construct_params)
2017-11-30 09:59:06 +00:00
site_construct.user_id = current_user.id.to_s
site_construct.save
redirect_to admin_site_panel_path("msg" => "success")
end
private
def site_construct_params
params.require(:site_construct).permit!
end
end