Sha256: df5828f77823252ee1944021fd61b98b556e7f304388dbd6df9879d9bd715e83

Contents?: true

Size: 627 Bytes

Versions: 13

Compression:

Stored size: 627 Bytes

Contents

class Admin::Shop::Products::VariantTemplatesController < Admin::ResourceController
  
  model_class ShopVariant
  
  def update
    error = 'Could not attach all Variants to Product.'
    
    @shop_product = ShopProduct.find(params[:product_id])
    
    if @shop_product.apply_variant_template(@shop_variant)
      respond_to do |format|
        format.html {
          redirect_to [ :edit_admin, @shop_product ]
        }
      end
    else
      respond_to do |format|
        format.html { 
          flash[:error] = error
          redirect_to [ :edit_admin, @shop_product ]
        }
      end
    end
    
  end
  
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
radiant-shop_variants-extension-0.1.3 app/controllers/admin/shop/products/variant_templates_controller.rb
radiant-shop_variants-extension-0.1.2 app/controllers/admin/shop/products/variant_templates_controller.rb
radiant-shop_variants-extension-0.1.1 app/controllers/admin/shop/products/variant_templates_controller.rb
radiant-shop_variants-extension-0.1.0 app/controllers/admin/shop/products/variant_templates_controller.rb
radiant-shop_variants-extension-0.0.4 app/controllers/admin/shop/products/variant_templates_controller.rb
radiant-shop_variants-extension-0.0.3 app/controllers/admin/shop/products/variant_templates_controller.rb
radiant-shop_variants-extension-0.0.1 app/controllers/admin/shop/products/variant_templates_controller.rb
radiant-shop-extension-0.11.6 app/controllers/admin/shop/products/variant_templates_controller.rb
radiant-shop-extension-0.11.5 app/controllers/admin/shop/products/variant_templates_controller.rb
radiant-shop-extension-0.11.4 app/controllers/admin/shop/products/variant_templates_controller.rb
radiant-shop-extension-0.11.3 app/controllers/admin/shop/products/variant_templates_controller.rb
radiant-shop-extension-0.11.1 app/controllers/admin/shop/products/variant_templates_controller.rb
radiant-shop-extension-0.11.0 app/controllers/admin/shop/products/variant_templates_controller.rb