Class: AuditRails::AuditsController
Instance Method Summary
collapse
#active?, #active_class, #add_to_audit, #get_action, #page_visits_by_user, #percentage_share
Instance Method Details
#analytics ⇒ Object
12
13
14
15
16
17
18
19
20
21
|
# File 'app/controllers/audit_rails/audits_controller.rb', line 12
def analytics
@analysis = AuditRails::Audit.analysis(@range_begin, @range_end)
@no_audits = AuditRails::Audit.count == 0
if params[:commit] == "DOWNLOAD REPORT"
find_all_audits
send_data(@audits.to_xls(:columns => [:user_name, :action, :description, :created_at],
:headers => ['User name', 'Action', 'Details', 'When?']), filename: 'audits.xls') and return
end
end
|
#create ⇒ Object
7
8
9
10
|
# File 'app/controllers/audit_rails/audits_controller.rb', line 7
def create
add_to_audit("visit-site", "xyz", "Fake User")
render :nothing => true, :status => 200, :content_type => 'text/html'
end
|