rails3-footnotes 4.0.0.pre.5 → 4.0.0.pre.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ == Footnotes v4.0.0.pre.6 (April 5, 2011)
2
+ * fix another Pathname error in Ruby 1.9
3
+
1
4
  == Footnotes v4.0.0.pre.5 (April 4, 2011)
2
5
  * fix Pathname error in Ruby 1.9
3
6
  * add view note that links to edit the view
@@ -18,7 +18,12 @@ module Footnotes
18
18
 
19
19
  protected
20
20
  def filename
21
- Dir[Footnotes.view_subscriber.layout.to_s+".html*"].first
21
+ @filename ||= begin
22
+ layout = Footnotes.view_subscriber.layout
23
+ layout_glob = Rails.root.join("app/views", layout).to_s
24
+ layout_glob += ".html*"
25
+ Dir[layout_glob].first
26
+ end
22
27
  end
23
28
 
24
29
  end
@@ -20,7 +20,7 @@ module Footnotes
20
20
 
21
21
  if @page
22
22
  view = Footnotes.view_subscriber.view_name
23
- layout = Footnotes.view_subscriber.layout_name
23
+ layout = Footnotes.view_subscriber.layout
24
24
  partial_time = Footnotes.view_subscriber.partial_time
25
25
 
26
26
  rows = [["View", "Layout", "View Render", "Partial Render", "Total Render"],
@@ -10,18 +10,13 @@ module Footnotes
10
10
  end
11
11
 
12
12
  def link
13
- escape(Footnotes::Filter.prefix(filename, 1, 1))
13
+ escape(Footnotes::Filter.prefix(Footnotes.view_subscriber.view, 1, 1))
14
14
  end
15
15
 
16
16
  def valid?
17
17
  prefix? && filename
18
18
  end
19
19
 
20
- protected
21
- def filename
22
- Footnotes.view_subscriber.view
23
- end
24
-
25
20
  end
26
21
  end
27
22
  end
@@ -1,3 +1,3 @@
1
1
  module Footnotes
2
- VERSION = "4.0.0.pre.5"
2
+ VERSION = "4.0.0.pre.6"
3
3
  end
@@ -30,14 +30,10 @@ module Footnotes
30
30
  end
31
31
 
32
32
  def view_name
33
- view && view.gsub(Rails.root.join("app/views/"),'')
33
+ view && view.gsub(Rails.root.join("app/views/").to_s, '')
34
34
  end
35
35
 
36
36
  def layout
37
- page && Rails.root.join("app/views", page.payload[:layout])
38
- end
39
-
40
- def layout_name
41
37
  page && page.payload[:layout]
42
38
  end
43
39
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails3-footnotes
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1923831843
4
+ hash: 1923831845
5
5
  prerelease: true
6
6
  segments:
7
7
  - 4
8
8
  - 0
9
9
  - 0
10
10
  - pre
11
- - 5
12
- version: 4.0.0.pre.5
11
+ - 6
12
+ version: 4.0.0.pre.6
13
13
  platform: ruby
14
14
  authors:
15
15
  - "Andr\xC3\xA9 Arko"