client_management/app/controllers/admin/site_panel_controller.rb

18 lines
421 B
Ruby
Raw Normal View History

class Admin::SitePanelController < OrbitAdminController
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