stage 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ == 0.4.3 2008-06-17
2
+ *Fixed: model_name was not correct with name contained underscore
3
+
1
4
  == 0.4.2 2008-06-04
2
5
  *Fixed: action_name is no longer an instance variable in 2.1
3
6
 
@@ -2,7 +2,7 @@ module Stage #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 4
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -9,7 +9,8 @@ class StageGenerator < Rails::Generator::NamedBase
9
9
  :plural_title_name,
10
10
  :singular_route_method,
11
11
  :plural_route_method,
12
- :action_name
12
+ :action_name,
13
+ :model_name
13
14
 
14
15
  attr_reader :controller_file_path,
15
16
  :controller_class_nesting,
@@ -35,11 +36,14 @@ class StageGenerator < Rails::Generator::NamedBase
35
36
  @plural_title_name = @controller_plural_name.humanize
36
37
  @singular_route_method = "#{@name.gsub("::", "_")}_path"
37
38
  @plural_route_method = "#{@name.gsub("::", "_").pluralize}_path"
39
+
38
40
  if Rails::VERSION::MAJOR >= 2 && Rails::VERSION::MINOR >= 1
39
41
  @action_name = "action_name"
40
42
  else
41
43
  @action_name = "@action_name"
42
44
  end
45
+
46
+ @model_name = @name.classify
43
47
  end
44
48
 
45
49
  def manifest
@@ -1,2 +1,2 @@
1
- class <%= singular_title_name %> < ActiveRecord::Base
1
+ class <%= model_name %> < ActiveRecord::Base
2
2
  end
@@ -33,7 +33,7 @@
33
33
  <h1>stage</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/stage"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/stage" class="numbers">0.4.2</a>
36
+ <a href="http://rubyforge.org/projects/stage" class="numbers">0.4.3</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;stage&#8217;</h1>
39
39
 
@@ -33,7 +33,7 @@
33
33
  <h1>stage</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/stage"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/stage" class="numbers">0.4.2</a>
36
+ <a href="http://rubyforge.org/projects/stage" class="numbers">0.4.3</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;stage&#8217;</h1>
39
39
 
@@ -33,7 +33,7 @@
33
33
  <h1>stage</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/stage"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/stage" class="numbers">0.4.2</a>
36
+ <a href="http://rubyforge.org/projects/stage" class="numbers">0.4.3</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;stage&#8217;</h1>
39
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Stone
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-06-04 00:00:00 -04:00
12
+ date: 2008-06-17 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15