Sha256: bcb5fc0946a504264e139572868231a32145f50e175f290235de986906dfe706

Contents?: true

Size: 393 Bytes

Versions: 2

Compression:

Stored size: 393 Bytes

Contents

module SharedEngine
  class PlainObjectsController < SharedEngine::ApplicationController
    before_action :setup_objects

    def index
      @users = [@han, @luke, @leia]

      respond_to do |format|
        format.xml { render_for_api params[:api_template].to_sym, xml: @users }
        format.json { render_for_api params[:api_template].to_sym, json: @users }
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
acts_as_api-1.0.1 spec/shared_engine/app/controllers/shared_engine/plain_objects_controller.rb
acts_as_api-1.0.0 spec/shared_engine/app/controllers/shared_engine/plain_objects_controller.rb