Sha256: d9853af0a2011f2eb3d99bdfcfa66d17fbb7985b4130e6e41bb76743cb48b37e

Contents?: true

Size: 511 Bytes

Versions: 2

Compression:

Stored size: 511 Bytes

Contents

module T2Airtime
  # Proxy products information
  class ProductsController < ApplicationController
    def index
      @products = T2Airtime::Product.all(permitted_params[:operator_id])
      if @products.success?
        render_data T2Airtime::Product.serialize @products.data,
                                                 @products.headers[:date]
      else
        render_error @products
      end
    end

    private

    def permitted_params
      filter_params.permit(:operator_id)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
t2_airtime-0.6.0 app/controllers/t2_airtime/products_controller.rb
t2_airtime-0.5.2 app/controllers/t2_airtime/products_controller.rb