zoo-generators 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -29,6 +29,9 @@ Feature: Zoo Scaffold Generator
|
|
29
29
|
And I run "rake db:migrate"
|
30
30
|
And I run "rails g zoo:scaffold Project"
|
31
31
|
Then I should see "input :some" in file "app/views/projects/_form.html.haml"
|
32
|
+
Then I should not see "input :id" in file "app/views/projects/_form.html.haml"
|
33
|
+
Then I should not see "input :created_at" in file "app/views/projects/_form.html.haml"
|
34
|
+
Then I should not see "input :updated_at" in file "app/views/projects/_form.html.haml"
|
32
35
|
|
33
36
|
|
34
37
|
Scenario: Generate scaffold with rspec tests
|
@@ -59,7 +59,8 @@ module Zoo
|
|
59
59
|
end
|
60
60
|
else
|
61
61
|
unless class_name.nil?
|
62
|
-
class_name.constantize.columns.each do |column|
|
62
|
+
class_name.constantize.columns.each do |column|
|
63
|
+
next if %w[id created_at updated_at].include?(column.name.to_s)
|
63
64
|
@model_attributes << Rails::Generators::GeneratedAttribute.new(column.name.to_s, column.type.to_s)
|
64
65
|
end
|
65
66
|
end
|