Sha256: 1d1ce3f2d491072c79d8cfa904ec8bae0e1227495e28dbf3773f0507f1dda78d

Contents?: true

Size: 798 Bytes

Versions: 3

Compression:

Stored size: 798 Bytes

Contents

module Credere
  # This controller provides restful route handling for Accounts.
  #
  # The controller supports ActiveResource, and provides for
  # HMTL, XML, and JSON presentation.
  #
  # == Security:
  # Only GET requests are supported. You should ensure that your application
  # controller enforces its own authentication and authorization, which this
  # controller will inherit.
  #

  class AccountsController < Credere::ApplicationController
    unloadable

    # @example
    #   GET /accounts
    #   GET /accounts.xml
    #   GET /accounts.json
    def index
      @accounts = Account.all

      respond_to do |format|
        format.html # index.html.erb
        format.xml  { render :xml => @accounts }
        format.json  { render :json => @accounts }
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
credere-0.10.3 app/controllers/credere/accounts_controller.rb
credere-0.10.2 app/controllers/credere/accounts_controller.rb
credere-0.10.1 app/controllers/credere/accounts_controller.rb