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

Error when invoking oauth_provider generator #113

Open
ghost opened this issue Apr 6, 2012 · 0 comments
Open

Error when invoking oauth_provider generator #113

ghost opened this issue Apr 6, 2012 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 6, 2012

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.

Cheers,
Jim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants