Using Rails 3.2.2.
When attempting to generate an oauth_provider, I get the following error:
$ rails g oauth_provider
/gems/railties-3.2.2/lib/rails/generators/named_base.rb:156:in parse_attributes!': undefined methodattributes=' for #OauthProviderGenerator:0x000000060441f0 (NoMethodError)
I solved it by modifying named_base.rb:
Convert attributes array into GeneratedAttribute objects.
def parse_attributes! #:nodoc:
if self.respond_to?(:attributes=) # Added this IF statement
self.attributes = (attributes || []).map do |attr|
Rails::Generators::GeneratedAttribute.parse(attr)
end
end
end
I'm not sure whether this is an issue for the oauth_plugin or for the Rails team.
Just thought I'd show you how I solved the problem.
Using Rails 3.2.2. When attempting to generate an oauth_provider, I get the following error:
$ rails g oauth_provider
/gems/railties-3.2.2/lib/rails/generators/named_base.rb:156:in
parse_attributes!': undefined method
attributes=' for #OauthProviderGenerator:0x000000060441f0 (NoMethodError)I solved it by modifying named_base.rb:
Convert attributes array into GeneratedAttribute objects.
I'm not sure whether this is an issue for the oauth_plugin or for the Rails team.
Just thought I'd show you how I solved the problem.
Cheers, Jim