josevalim-rails-footnotes 3.6.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.1
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
@@ -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: josevalim-rails-footnotes
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.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-06-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