active_enum 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG
CHANGED
data/lib/active_enum/version.rb
CHANGED
@@ -62,6 +62,13 @@ describe ActiveEnum::FormHelpers::Formtastic, :type => :helper do
|
|
62
62
|
output.should have_selector('input#person_first_name')
|
63
63
|
end
|
64
64
|
|
65
|
+
it "should allow models without enumerated attributes to behave normally" do
|
66
|
+
output = semantic_form_for(NoEnumPerson.new, :url => people_path) do |f|
|
67
|
+
concat f.input(:first_name)
|
68
|
+
end
|
69
|
+
output.should have_selector('input#no_enum_person_first_name')
|
70
|
+
end
|
71
|
+
|
65
72
|
def people_path
|
66
73
|
'/people'
|
67
74
|
end
|
@@ -63,6 +63,13 @@ describe ActiveEnum::FormHelpers::SimpleForm, :type => :helper do
|
|
63
63
|
output.should have_selector('input#person_first_name')
|
64
64
|
end
|
65
65
|
|
66
|
+
it "should allow models without enumerated attributes to behave normally" do
|
67
|
+
output = simple_form_for(NoEnumPerson.new, :url => people_path) do |f|
|
68
|
+
concat f.input(:first_name)
|
69
|
+
end
|
70
|
+
output.should have_selector('input#no_enum_person_first_name')
|
71
|
+
end
|
72
|
+
|
66
73
|
def people_path
|
67
74
|
'/people'
|
68
75
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -26,6 +26,9 @@ ActiveRecord::Base.establish_connection({:adapter => 'sqlite3', :database => ':m
|
|
26
26
|
require 'schema'
|
27
27
|
|
28
28
|
class Person < ActiveRecord::Base; end
|
29
|
+
class NoEnumPerson < ActiveRecord::Base
|
30
|
+
set_table_name 'people'
|
31
|
+
end
|
29
32
|
|
30
33
|
class NotActiveRecord
|
31
34
|
include ActiveModel::Validations
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_enum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 55
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 6
|
10
|
+
version: 0.9.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Adam Meehan
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-13 00:00:00 +10:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|