jeffp-enumerated_attribute 0.2.1 → 0.2.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.rdoc +2 -2
- data/Rakefile +1 -1
- data/lib/enumerated_attribute/rails_helpers.rb +2 -1
- metadata +2 -2
data/README.rdoc
CHANGED
|
@@ -86,7 +86,7 @@ Expose the enumeration in your forms with +enum_select+
|
|
|
86
86
|
<% end %>
|
|
87
87
|
|
|
88
88
|
or generate a scaffold with one of your favorite scaffold generators. Currently
|
|
89
|
-
|
|
89
|
+
supports most scaffold generators including scaffold, wizardly_scaffold, nifty_scaffold, rspec_scaffold, and haml_scaffold.
|
|
90
90
|
See the section 'Generating Scaffolds' below.
|
|
91
91
|
|
|
92
92
|
The select options text can be customized. See 'Customizing Labels' in the Integration section.
|
|
@@ -474,7 +474,7 @@ example with the +form_tag+ and a @user object.
|
|
|
474
474
|
==== Generating Scaffolds
|
|
475
475
|
|
|
476
476
|
You can generate views with enumerations using your favorite scaffold generator. Currently
|
|
477
|
-
|
|
477
|
+
supports most scaffold generators including scaffold, wizardly_scaffold, nifty_scaffold, rspec_scaffold and haml_scaffold.
|
|
478
478
|
For most scaffolds there are two steps. First, generate the scaffold views and
|
|
479
479
|
migrations using the 'enum' type for enumerations
|
|
480
480
|
|
data/Rakefile
CHANGED
|
@@ -5,7 +5,7 @@ require 'rake/contrib/sshpublisher'
|
|
|
5
5
|
|
|
6
6
|
spec = Gem::Specification.new do |s|
|
|
7
7
|
s.name = 'enumerated_attribute'
|
|
8
|
-
s.version = '0.2.
|
|
8
|
+
s.version = '0.2.2'
|
|
9
9
|
s.platform = Gem::Platform::RUBY
|
|
10
10
|
s.description = 'Enumerated model attributes and view helpers'
|
|
11
11
|
s.summary = 'Add enumerated attributes to your models and expose them in drop-down lists in your views'
|
|
@@ -20,7 +20,8 @@ if defined?(ActiveRecord)
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
#ARGV is used by generators -- if it contains one of these generator commands - add enumeration support
|
|
23
|
-
unless ((ARGV || []) & ["scaffold", "rspec_scaffold", "nifty_scaffold"]).empty?
|
|
23
|
+
#unless ((ARGV || []) & ["scaffold", "rspec_scaffold", "nifty_scaffold"]).empty?
|
|
24
|
+
if ((ARGV || []).any?{|o| o =~ /scaffold/ })
|
|
24
25
|
require 'rails_generator'
|
|
25
26
|
module Rails
|
|
26
27
|
module Generator
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jeffp-enumerated_attribute
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jeff Patmon
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-08-
|
|
12
|
+
date: 2009-08-07 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies: []
|
|
15
15
|
|