Skip to content

Commit 5b40acf

Browse files
author
Matt Swanson
committed
dont authentication asset paths (assetpack needs to emulate GETs), closes stringer-rss#112
1 parent e85f99f commit 5b40acf

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎app.rb‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ def t(*args)
5353
end
5454

5555
assets {
56-
serve "/js", from: "/js"
57-
serve "/css", from: "/css"
58-
serve "/images", from: "/img"
56+
serve "/js", from: "app/public/js"
57+
serve "/css", from: "app/public/css"
58+
serve "/images", from: "app/public/img"
5959

6060
js :application, "/js/application.js", [
6161
"/js/jquery-min.js",
@@ -79,7 +79,6 @@ def t(*args)
7979
css_compression :simple
8080

8181
prebuild true unless ENV['RACK_ENV'] == 'test'
82-
cache_dynamic_assets true
8382
}
8483

8584
before do

‎app/helpers/authentication_helpers.rb‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ def needs_authentication?(path)
1212
return false if ENV['RACK_ENV'] == 'test'
1313
return false if !UserRepository.setup_complete?
1414
return false if path == "/login" || path == "/logout"
15+
return false if path =~ /css/ || path =~ /js/ || path =~ /img/
1516
true
1617
end
1718

‎app/views/layout.erb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
<link rel="shortcut icon" href="/img/favicon.png">
1111
<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,900,400italic" rel="stylesheet" type="text/css">
1212

13+
<%= yield_content :head %>
14+
1315
<%= css :application %>
1416
<%= js :application %>
15-
16-
<%= yield_content :head %>
1717
</head>
1818
<body>
1919
<div id="wrap">

0 commit comments

Comments
 (0)