missing_controller_helpers_generator 1.0.0
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.
@@ -0,0 +1,18 @@
|
|
1
|
+
class MissingControllerHelpersGenerator < Rails::Generator::Base
|
2
|
+
def manifest
|
3
|
+
record do |manifest|
|
4
|
+
|
5
|
+
manifest.directory("app/controller_helpers")
|
6
|
+
|
7
|
+
controllers = ControllerHelpers::Runner.find_controllers
|
8
|
+
|
9
|
+
# puts "controllers = #{controllers.inspect}"
|
10
|
+
|
11
|
+
controllers.each do |cont|
|
12
|
+
manifest.directory("app/controller_helpers/#{cont.class_with_module.gsub(cont.class_name, "")}")
|
13
|
+
manifest.template("app/controller_helpers/controller_helper.template", "app/controller_helpers/#{cont.class_with_module}_helper.rb", :collision => :skip, :assigns => {:controller_name => cont.class_with_module_camel})
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# This helper will be attached, automatically, to the following controller: <%= controller_name %>.
|
2
|
+
# All public methods in this module will be automatically set to protected. This means that none of the methods
|
3
|
+
# in this helper will be available as public actions.
|
4
|
+
# If you wish to include this helper into another controller simply use the following command:
|
5
|
+
# include_into_controller :foo (where foo is the name of the controller).
|
6
|
+
# You may also use an array such as this:
|
7
|
+
# include_into_controller :foo, :bar, :application, :users, :etc
|
8
|
+
module <%= controller_name %>Helper
|
9
|
+
|
10
|
+
end
|
metadata
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
rubygems_version: 0.9.2
|
3
|
+
specification_version: 1
|
4
|
+
name: missing_controller_helpers_generator
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: 1.0.0
|
7
|
+
date: 2007-09-11 00:00:00 -04:00
|
8
|
+
summary: missing_controller_helpers_generator
|
9
|
+
require_paths:
|
10
|
+
- lib
|
11
|
+
- lib
|
12
|
+
- lib
|
13
|
+
- lib/tasks
|
14
|
+
email:
|
15
|
+
homepage:
|
16
|
+
rubyforge_project: magrathea
|
17
|
+
description: "missing_controller_helpers_generator was developed by: markbates"
|
18
|
+
autorequire: []
|
19
|
+
|
20
|
+
default_executable:
|
21
|
+
bindir: bin
|
22
|
+
has_rdoc: false
|
23
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 0.0.0
|
28
|
+
version:
|
29
|
+
platform: ruby
|
30
|
+
signing_key:
|
31
|
+
cert_chain:
|
32
|
+
post_install_message:
|
33
|
+
authors:
|
34
|
+
- markbates
|
35
|
+
files:
|
36
|
+
- lib/tasks/rubyforge_config.yml
|
37
|
+
- missing_controller_helpers_generator.rb
|
38
|
+
- templates/app/controller_helpers/controller_helper.template
|
39
|
+
test_files: []
|
40
|
+
|
41
|
+
rdoc_options: []
|
42
|
+
|
43
|
+
extra_rdoc_files: []
|
44
|
+
|
45
|
+
executables: []
|
46
|
+
|
47
|
+
extensions: []
|
48
|
+
|
49
|
+
requirements: []
|
50
|
+
|
51
|
+
dependencies: []
|
52
|
+
|