Class: Virgo::Admin::SitesController

Inherits:
BaseController show all
Defined in:
app/controllers/virgo/admin/sites_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#authorize_admin_user, #search, #set_is_admin_view

Methods included from RenderHelper

#render_content, #with_format

Methods included from Virgo::ApplicationHelper

#action?, #admin?, #admin_access?, #admin_view?, #alerts, #base_errors, #category_timestamp, #column_timestamp, #compact_html, #controller?, #decode_html_entities, #expanded_post_url, #is_admin_view?, #page_url, #post_time_format, #post_timestamp, #production?, #redis_timestamp_key_for, #site, #site_key, #superuser?, #tabbed_param, #word_count

Instance Method Details

#editObject



7
8
# File 'app/controllers/virgo/admin/sites_controller.rb', line 7

def edit
end

#stylesObject



20
21
22
23
24
25
26
27
28
29
# File 'app/controllers/virgo/admin/sites_controller.rb', line 20

def styles
  if request.patch?
    if @site.update(site_params)
      flash[:notice] = "Site styles saved"
      redirect_to admin_site_styles_path
    else
      render :styles
    end
  end
end

#updateObject



10
11
12
13
14
15
16
17
# File 'app/controllers/virgo/admin/sites_controller.rb', line 10

def update
  if @site.update(site_params)
    flash[:notice] = "Site settings saved"
    redirect_to admin_site_edit_path
  else
    render :edit
  end
end