Sha256: 7128368da4b96683905c32da4a2dc00bfd9c581bf5909a419ddb2a2d38a78167

Contents?: true

Size: 829 Bytes

Versions: 19

Compression:

Stored size: 829 Bytes

Contents

class Admin::GatewayOptionValuesController < Admin::BaseController
  resource_controller
  
  belongs_to :gateway_configuration

  index.before do
    chosen_gateway = Gateway.find(params[:gw_id])
    @option_values = @gateway_configuration.gateway_option_values
    unless @gateway_configuration.gateway == chosen_gateway
      # show a blank set of values for editing purposes (original values preserved in DB until user posts the update)
      @option_values = []
      chosen_gateway.gateway_options.each do |option|
        @option_values << GatewayOptionValue.new(:gateway_option => option)
      end
    end
  end
  
  index.response do |wants|
    wants.html { render :partial => "options", 
                        :layout => false, 
                        :locals => {:option_values => @option_values} }
  end
    
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
spree-enriquez-0.9.4 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.9.4 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.9.3 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.9.2 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.9.1 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.9.0 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.8.4 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.8.5 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.4.0 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.4.1 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.5.0 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.6.0 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.5.1 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.7.0 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.7.1 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.8.0 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.8.1 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.8.2 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb
spree-0.8.3 vendor/extensions/payment_gateway/app/controllers/admin/gateway_option_values_controller.rb