Class: Optimacms::Admin::RailsLogsController

Inherits:
AdminBaseController show all
Defined in:
app/controllers/optimacms/admin/rails_logs_controller.rb

Instance Method Summary collapse

Methods inherited from AdminBaseController

#after_sign_in_path_for, #redirect_to_res, #set_layout_modal_old

Methods inherited from Optimacms::ApplicationController

#current_lang, #not_found

Methods included from Optimacms::ApplicationHelper

#block, #block_with_edit, #eval_meta_string, #fix_quotes, #meta_tags, #method_missing, #msg, #tinymce_editor_insert_block, #url_for

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Optimacms::ApplicationHelper

Instance Method Details

#indexObject



4
5
6
# File 'app/controllers/optimacms/admin/rails_logs_controller.rb', line 4

def index

end

#list_logsObject



8
9
10
11
12
# File 'app/controllers/optimacms/admin/rails_logs_controller.rb', line 8

def list_logs
  name = params[:name]

  send "list_logs_#{name}"
end

#list_logs_appObject



14
15
16
17
18
19
20
21
# File 'app/controllers/optimacms/admin/rails_logs_controller.rb', line 14

def list_logs_app
  @path = File.join(Rails.root, 'log', Rails.env + ".log")
  @filename = File.basename(@path)

  @text = `tail -n 2000 #{@path}`

  render :template => "optimacms/admin/rails_logs/list_logs_app.html.haml"
end