Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 3: rails g scaffold doesn't work #9

Merged
merged 1 commit into from Sep 15, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/enumerated_attribute/rails_helpers.rb
Expand Up @@ -36,7 +36,6 @@ def enum(*args)
#ARGV is used by generators -- if it contains one of these generator commands - add enumeration support
#unless ((ARGV || []) & ["scaffold", "rspec_scaffold", "nifty_scaffold"]).empty?
if ((ARGV || []).any?{|o| o =~ /scaffold/ })
require 'rails_generator' rescue nil
begin
require 'rails/generators'
require 'rails/generators/generated_attribute'
Expand All @@ -45,7 +44,7 @@ def enum(*args)
end

module Rails
module Generator
module Generators
class GeneratedAttribute
def field_type_with_enumerated_attribute
return (@field_type = :enum_select) if type == :enum
Expand Down