pelle / oauth-plugin

Rails plugin for OAuth
http://stakeventures.com/articles/2009/07/21/consuming-oauth-intelligently-in-rails
MIT License
716 stars 216 forks source link

Shouldn't rails generate oauth_provider also generate views? #50

Closed asavin closed 13 years ago

asavin commented 13 years ago

Trying to use oauth-plugin with Rails 3 application. When running rails generate oauth_provider I get models and controllers generated successfully. But no views. Those are missing completely, though I think they should be generated as well. At least according to this tutorial: http://stakeventures.com/articles/2007/11/26/how-to-turn-your-rails-site-into-an-oauth-provider

Gemfile:

gem 'rails' gem 'simple_form' gem 'paperclip', '~> 2.3' gem 'devise', '1.2.rc' gem 'oa-oauth', :require => 'omniauth/oauth' gem 'jquery-rails', '>= 0.2.6' gem 'oauth' gem 'oauth-plugin', '>=0.4.0.pre1'

These are generated: invoke active_record identical app/models/client_application.rb identical app/models/oauth_token.rb identical app/models/request_token.rb identical app/models/access_token.rb identical app/models/oauth2_token.rb identical app/models/oauth2_verifier.rb identical app/models/oauth_nonce.rb

Wonder is it an issue?

afeld commented 13 years ago

I believe the views aren't generated because they aren't needed - most of the oauth actions are just redirects. If you need views you can add them.

Gurpartap commented 13 years ago
$ rails generate oauth_provider oauth # will generate everything, including injecting routes.
pelle commented 13 years ago

This was a bug in the erb generator. It is fixed now.