Skip to content

Commit

Permalink
Fix version number exception
Browse files Browse the repository at this point in the history
  • Loading branch information
allmarkedup committed Dec 6, 2021
1 parent e6ad0cd commit b8afb15
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/layouts/lookbook/app.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
window.SOCKET_PATH = "<%= Lookbook::Engine.websocket_mount_path %>";
</script>
<% end %>
<script src="/lookbook-assets/js/app.js?v=<%= Lookbook::VERSION %>" defer></script>
<script src="/lookbook-assets/js/app.js?v=<%= Lookbook.version %>" defer></script>

<title><%= [@example&.label, @preview&.label, "Lookbook"].compact.join(" :: ") %></title>
</head>
Expand Down
1 change: 1 addition & 0 deletions lib/lookbook.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require "active_support/dependencies/autoload"
require "lookbook/engine"
require "lookbook/version"

module Lookbook
extend ActiveSupport::Autoload
Expand Down
4 changes: 4 additions & 0 deletions lib/lookbook/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ def config
def logger
@logger ||= config.debug == true ? Rails.logger : Lookbook::NullLogger.new
end

def version
Lookbook::VERSION
end
end

class Engine < Rails::Engine
Expand Down

0 comments on commit b8afb15

Please sign in to comment.