Class: SweetStaging::LogsController
Instance Method Summary
collapse
#active?, #format_datetime, #icon, #insert_css_file, #insert_js_file
Instance Method Details
#changes ⇒ Object
10
11
12
13
|
# File 'app/controllers/sweet_staging/logs_controller.rb', line 10
def changes
@lines = log_file.readlines
@total_lines = log_file.total_lines
end
|
#log_file ⇒ Object
15
16
17
18
19
20
|
# File 'app/controllers/sweet_staging/logs_controller.rb', line 15
def log_file
@log_file ||= begin
item = SweetStaging.logs.detect {|e| e[:name] == params[:name]}
LogFile.new(path: "#{::Rails.root}/#{item[:path]}", client_total_lines: params[:client_total_lines])
end
end
|
#watch ⇒ Object
7
8
|
# File 'app/controllers/sweet_staging/logs_controller.rb', line 7
def watch
end
|