Skip to content

Commit

Permalink
in static mode, default to format: html until i find a reason not to …
Browse files Browse the repository at this point in the history
…do so
  • Loading branch information
phillmv committed Mar 27, 2022
1 parent 742bbf4 commit 02a37a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/helpers/url_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def self.entry_params(entry)
name_with_path = "#{name}_path".to_sym
define_method name_with_path do |entry, opts = {}|
if Arquivo.static?
RailsUrlHelpers.send(name_with_path, entry, opts.except(:notebook))
RailsUrlHelpers.send(name_with_path, entry, opts.except(:notebook).merge(format: "html"))
else
RailsUrlHelpers.send(name_with_path, entry, opts.merge(UrlHelper.entry_params(entry)))
end
Expand All @@ -27,7 +27,7 @@ def self.entry_params(entry)
name_with_path = "#{name}_path".to_sym
define_method name_with_path do |notebook, opts = {}|
if Arquivo.static?
RailsUrlHelpers.send(name_with_path, opts.except(:notebook))
RailsUrlHelpers.send(name_with_path, opts.except(:notebook).merge(format: "html"))
else
RailsUrlHelpers.send(name_with_path, opts.merge(UrlHelper.notebook_params(notebook)))
end
Expand All @@ -40,7 +40,7 @@ def copy_entry_path(entry, target_notebook, opts = {})

def calendar_daily_path(date, notebook, opts = {})
if Arquivo.static?
RailsUrlHelpers.calendar_daily_path(date, opts)
RailsUrlHelpers.calendar_daily_path(date, opts.merge(format: "html"))
else
RailsUrlHelpers.calendar_daily_path(date, opts.merge(UrlHelper.notebook_params(notebook)))
end
Expand Down

0 comments on commit 02a37a4

Please sign in to comment.