Skip to content

Commit

Permalink
Merge 043a3d0 into 00af59f
Browse files Browse the repository at this point in the history
  • Loading branch information
bbonislawski committed Feb 13, 2018
2 parents 00af59f + 043a3d0 commit 4eb67ec
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions lib/versioncake/view_additions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@
ActionView::PathResolver.class_eval do
# not sure why we are doing this yet, but looks like a good idea
if ActionPack::VERSION::MAJOR >= 4 && ActionPack::VERSION::MINOR >= 1 || ActionPack::VERSION::MAJOR >= 5
ActionView::PathResolver::EXTENSIONS.replace({
locale: ".",
formats: ".",
versions: ".",
variants: "+",
handlers: "."
})
ActionView::PathResolver::EXTENSIONS[:versions] = "."

ActionView::PathResolver::DEFAULT_PATTERN.replace ":prefix/:action{.:locale,}{.:formats,}{+:variants,}{.:versions,}{.:handlers,}"
def initialize(pattern = nil)
@pattern = pattern || ":prefix/:action{.:locale,}{.:formats,}{+:variants,}{.:versions,}{.:handlers,}"
super()
end
else
ActionView::PathResolver::EXTENSIONS.replace [:locale, :formats, :versions, :handlers]

Expand Down

0 comments on commit 4eb67ec

Please sign in to comment.