views:

135

answers:

1

I am trying to install the mogli gem( http://github.com/mmangino/mogli ) on rails 3 and am running into problems with the configuration. I have NO prior experience with Rails 2.

For Rails 2

Add config.gem "mogli" to environment.rb

For Rails 3, I added the following to the gemfile.

gem 'mogli'

For Rails 2, routes

map.resource :oauth, :controller=>"oauth"
map.root :controller=>"oauth"
map.oauth_callback "/oauth/create", :controller=>"oauth", :action=>"create"

For Rails 3, I added

resources :oauth
root :to => "oauth#index"

And I do not know how to represent the map.oauth_callback in Rails 3.

Thanks

+2  A: 

try:

match "/oauth/create", :to => "oauth#create", :via => "get", :as => "oauth_callback"
stephenmurdoch
[this](http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/) article is pretty good for helping with routes problems
stephenmurdoch
PS - beware that the original route, is a singular resource `map.resource :oauth, :controller=>"oauth"` - you have specified a plural i.e. `resources :oauth` - might be better to change it to `resource :oauth` - just bear it in mind - hope this helps
stephenmurdoch
@Dara I have my resource set as singular and my controller named as singular and it works fine.
Joey
@Joey Yep, I had a bug! Thanks [OC removed]
Dara