lib/controllers/generate.rb in evertils-0.3.1.3 vs lib/controllers/generate.rb in evertils-0.3.2
- old
+ new
@@ -37,11 +37,11 @@
title = @format.date_templates[NOTEBOOK_DAILY]
body = @format.template_contents
body += to_enml($config.custom_sections[NOTEBOOK_DAILY]) if $config.custom_sections[NOTEBOOK_DAILY]
parent_notebook = NOTEBOOK_DAILY
- @model.create_note(title, body, parent_notebook)
+ @model.create_note(title: title, body: body, parent_notebook: parent_notebook)
end
# generate weekly notes
def weekly
title = @format.date_templates[NOTEBOOK_WEEKLY]
@@ -53,11 +53,11 @@
if !Date.today.monday?
Notify.error("Sorry, you can only create new weekly logs on Mondays", {})
end
end
- note = @model.create_note(title, body, parent_notebook)
+ note = @model.create_note(title: title, body: body, parent_notebook: parent_notebook)
tag_manager = Evertils::Common::Manager::Tag.new
week_tag = tag_manager.find("week-#{DateTime.now.cweek + 1}")
note.tag(week_tag.prop(:name))
end
@@ -67,11 +67,11 @@
title = @format.date_templates[NOTEBOOK_MONTHLY]
body = @format.template_contents
body += to_enml($config.custom_sections[NOTEBOOK_MONTHLY]) if $config.custom_sections[NOTEBOOK_MONTHLY]
parent_notebook = NOTEBOOK_MONTHLY
- note = @model.create_note(title, body, parent_notebook)
+ note = @model.create_note(title: title, body: body, parent_notebook: parent_notebook)
tag_manager = Evertils::Common::Manager::Tag.new
month_tag = tag_manager.find("month-#{DateTime.now.strftime('%-m')}")
note.tag(month_tag.prop(:name))
end
@@ -84,10 +84,10 @@
body = @format.template_contents
body += to_enml($config.custom_sections[NOTEBOOK_MTS]) if $config.custom_sections[NOTEBOOK_MTS]
parent_notebook = NOTEBOOK_MTS
# create the note from template
- mts_note = @model.create_note(title, body, parent_notebook)
+ mts_note = @model.create_note(title: title, body: body, parent_notebook: parent_notebook)
# tag it
# TODO: maybe move this out of controller?
tag_manager = Evertils::Common::Manager::Tag.new
month_tag = tag_manager.find("month-#{DateTime.now.strftime('%-m')}")