Sha256: b1012982e6342c50ed8a23261ab7d618b2bb15f603dc4eb1647416177638823a

Contents?: true

Size: 844 Bytes

Versions: 30

Compression:

Stored size: 844 Bytes

Contents

class Admin::ShopsController < AdminController

  respond_to :html

  def edit
    respond_with(:admin, current_shop)
  end

  def update
    if current_shop.update_attributes(post_params[:shop])
      redirect_to edit_admin_shop_path, notice: 'Shop was successfully updated'
    else
      respond_with(:admin, current_shop)
    end
  end

  private

  def post_params
    params.permit(shop: [ :name,
                          :theme,
                          :author_name,
                          :description,
                          :time_zone,
                          :from_email,
                          :default_creditcard_action,
                          :twitter_handle,
                          :facebook_url,
                          :google_analytics_tracking_id,
                          :tax_percentage])
  end

end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
nimbleshop_core-0.0.23 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.21 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.20 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.19 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.17 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.16 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.15 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.14 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.14.rc2 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.14.rc1 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.13 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.12 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.11 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.10 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.9 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.8 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.7 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.5 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.4.beta1 app/controllers/admin/shops_controller.rb
nimbleshop_core-0.0.4 app/controllers/admin/shops_controller.rb