Sha256: 2c7c2ba8a788508009f96b654c7ccbc61fa04feb829fa15ff6e20963b82e426f

Contents?: true

Size: 473 Bytes

Versions: 1

Compression:

Stored size: 473 Bytes

Contents

require_dependency "audit_rails/application_controller"

module AuditRails
  class AuditsController < ApplicationController

    def index
      @audits = AuditRails::Audit.all
  
      respond_to do |format|
        format.html # index.html.erb
        format.json { render json: @audits }
      end
    end

    def create
      add_to_audit("visit-site", "xyz", "Fake User")
      render :nothing => true, :status => 200, :content_type => 'text/html'
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
audit_rails-0.0.2 app/controllers/audit_rails/audits_controller.rb