mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-04 18:36:13 +02:00
Add method to update content of note.
This commit is contained in:
parent
5c3e8952bc
commit
e2e884e317
@ -12,6 +12,18 @@ class Fluentd
|
||||
def initialize(file_path)
|
||||
@file_path = file_path
|
||||
end
|
||||
|
||||
def update(content)
|
||||
begin
|
||||
File.open(@file_path, "w") do |f|
|
||||
f.write content
|
||||
end
|
||||
rescue => ex
|
||||
Rails.logger.error ex.message
|
||||
return false
|
||||
end
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user