artofmission-rails-footnotes 3.6.0.1 → 3.6.2

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/README CHANGED
@@ -1,6 +1,6 @@
1
1
  Rails Footnotes
2
2
  License: MIT
3
- Version: 3.6
3
+ Version: 3.6.2
4
4
 
5
5
  You can also read this README in pretty html at the GitHub project Wiki page
6
6
 
@@ -38,7 +38,7 @@ If you want it as plugin, just do:
38
38
  If you are running on Rails 2.2 or Rails 2.1 you should do:
39
39
 
40
40
  cd myapp
41
- git clone git://github.com/josevalim/rails-footnotes.git
41
+ git clone git://github.com/josevalim/rails-footnotes.git vendor/plugins/rails-footnotes
42
42
  cd vendor/plugins/rails-footnotes
43
43
  git checkout VERSION_NUMBER
44
44
  rm -rf ./.git
@@ -6,7 +6,7 @@ if RAILS_ENV == 'development'
6
6
  # Load all notes
7
7
  #
8
8
  Dir[File.join(dir, 'rails-footnotes', 'notes', '*.rb')].each do |note|
9
- require note
9
+ require note unless note =~ /queries/ && !defined?(ActiveRecord)
10
10
  end
11
11
 
12
12
  # The footnotes are applied by default to all actions. You can change this
@@ -13,10 +13,10 @@ module Footnotes
13
13
  @@notes += [ :assigns, :session, :cookies, :params, :filters, :routes, :env, :queries, :log, :general ]
14
14
 
15
15
  # Change queries for rpm note when available
16
- if defined?(NewRelic)
17
- @@notes.delete(:queries)
18
- @@notes << :rpm
19
- end
16
+ # if defined?(NewRelic)
17
+ # @@notes.delete(:queries)
18
+ # @@notes << :rpm
19
+ # end
20
20
 
21
21
  # :no_style => If you don't want the style to be appended to your pages
22
22
  # :notes => Class variable that holds the notes to be processed
@@ -25,7 +25,15 @@ module Footnotes
25
25
  def controller_filename
26
26
  controller_name=@controller.class.to_s.underscore
27
27
  controller_name='application' if controller_name=='application_controller'
28
- File.join(File.expand_path(RAILS_ROOT), 'app', 'controllers', "#{controller_name}.rb").sub('/controllers/controllers/', '/controllers/')
28
+ if ActionController::Routing.respond_to? :controller_paths
29
+ ActionController::Routing.controller_paths.each do |controller_path|
30
+ full_controller_path = File.join(File.expand_path(controller_path), "#{controller_name}.rb")
31
+ return full_controller_path if File.exists?(full_controller_path)
32
+ end
33
+ raise "File not found"
34
+ else
35
+ File.join(File.expand_path(RAILS_ROOT), 'app', 'controllers', "#{controller_name}.rb").sub('/controllers/controllers/', '/controllers/')
36
+ end
29
37
  end
30
38
 
31
39
  def controller_text
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artofmission-rails-footnotes
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0.1
4
+ version: 3.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Jos\xC3\xA9 Valim"
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-12 00:00:00 -07:00
12
+ date: 2009-07-12 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -49,6 +49,7 @@ files:
49
49
  - lib/rails-footnotes/notes/view_note.rb
50
50
  has_rdoc: true
51
51
  homepage: http://github.com/josevalim/rails-footnotes
52
+ licenses:
52
53
  post_install_message:
53
54
  rdoc_options:
54
55
  - --main
@@ -70,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
71
  requirements: []
71
72
 
72
73
  rubyforge_project:
73
- rubygems_version: 1.2.0
74
+ rubygems_version: 1.3.5
74
75
  signing_key:
75
76
  specification_version: 2
76
77
  summary: Every Rails page has footnotes that gives information about your application and links back to your editor.