Sha256: b3ed63f647c9a38dc2b7f3f089f042305c1afd1b28e8077ef96ce0c00f914a80

Contents?: true

Size: 1013 Bytes

Versions: 17

Compression:

Stored size: 1013 Bytes

Contents

class Admin::Disguise::DomainThemesController < ApplicationController
  unloadable

  def create
    @domain_theme = DomainTheme.new(params[:domain_theme])
    if !@domain_theme.save
      flash[:notice] = t('disguise.error_creating_domain_theme', :error => @domain_theme.errors.full_messages.to_sentence)
    else
      flash[:notice] = t('disguise.theme_updated')
    end
    respond_to do |format|
      format.html { redirect_to edit_admin_theme_path }
    end
  end
  
  def update
    @domain_theme = DomainTheme.find_by_name(params[:domain_theme][:name])
    @domain_theme.update_attributes!(params[:domain_theme])
    respond_to do |format|
      flash[:notice] = t('disguise.theme_updated')
      format.html { redirect_to edit_admin_theme_path }
    end
  end

  def destroy
    @domain_theme = DomainTheme.find(params[:id])
    @domain_theme.destroy
    respond_to do |format|
      flash[:notice] = t('disguise.uri_deleted')
      format.html { redirect_to edit_admin_theme_path }
    end
  end
  
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
disguise-3.0.2 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-3.0.1 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-3.0.0 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-2.0.0 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-0.4.0 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-0.3.12 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-0.3.11 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-0.3.10 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-0.3.8 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-0.3.7 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-0.3.6 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-0.3.1 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-0.3.2 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-0.3.3 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-0.3.4 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-0.3.5 app/controllers/admin/disguise/domain_themes_controller.rb
disguise-0.3.0 app/controllers/admin/disguise/domain_themes_controller.rb