Class: Account::TransactionsController

Inherits:
BaseController show all
Defined in:
app/controllers/account/transactions_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

caches_page_with_cache_marker, #raise_not_found!

Instance Method Details

#featuresObject



16
17
18
19
20
21
22
23
# File 'app/controllers/account/transactions_controller.rb', line 16

def features
  @features = TranslationCms::Api::Customers::Feature.get_available(params[:order_id])
                                                     .reject { |f| f.feature_type.preferred_writer? }
  @payment_types = PaymentType.visible
  @exchange_rates = TranslationCms::Api::Rates::Currency.all!

  respond_with @features
end

#showObject



10
11
12
13
14
# File 'app/controllers/account/transactions_controller.rb', line 10

def show
  @structure = Structure.with_type(StructureType.page).where(slug: 'order-text').first

  respond_with @payment
end

#updateObject



25
26
27
28
29
30
# File 'app/controllers/account/transactions_controller.rb', line 25

def update
  params[:order_id] ||= params[:id]
  @form = Account::FeaturesForm.new(params)
  @form.submit if @form.valid?
  respond_with @form
end