Devise + OmniAuth + Refinery CMS + Rails 3.2

472 views
Skip to first unread message

Amit Patel

unread,
Sep 28, 2012, 1:37:58 AM9/28/12
to refine...@googlegroups.com, sdo...@sdownie.com

We have used Devise + OmniAuth as authentication mechanism to authenticate user with facebook, twitter and openid in our existing Rails 3.2 application. We are trying to integrate Refinery CMS into the application.

Requirement: The home page of application has Signup/Signin buttons with some static content. On Signing in, user is able to access restricted area. We want to add a link to access Refinery CMS on a restricted page. It should not ask for any credential again.

We followed following links to integrate Refinery CMS:


We also followed all the steps from http://sdownie.com/blogs/integrating-refinery-rails-3-2-into-your-existing-rails-app but I am getting following error.

ActionView::Template::Error (undefined method `user_omniauth_authorize_path' for #<#<Class:0xbe0922c>:0xbb72bf8>)

But rake routes it shows above route in listing.

However when I got error while running following command:

> Rails.application.routes.url_helpers.user_omniauth_authorize_path
ActionController::RoutingError: No route matches {:controller=>"users/omniauth_callbacks", :action=>"passthru"}


Earlier we tried with 3.1 but have different set of issues. Please have a look https://groups.google.com/d/topic/refinery-cms/w-4VrfPewQY/discussion


Philip Arndt

unread,
Sep 28, 2012, 5:42:34 AM9/28/12
to refine...@googlegroups.com
Try prefixing with main_app. like so:

main_app.user_omniauth_authorize_path

Amit Patel

unread,
Sep 28, 2012, 6:49:25 AM9/28/12
to refine...@googlegroups.com
Thanks, moved little further

now getting "undefined method `destroy_refinery_user_session_path'" error in

app/views/layouts/_navigation.html.haml
<%= link_to t('.log_out', site_bar_translate_locale_args),
                    main_app.destroy_refinery_user_session_path, :id => 'logout', :method => :delete %>

I also tried with removing prefix main_app but din't help. Though if I remove above code, it works.

Philip Arndt

unread,
Sep 28, 2012, 6:51:10 AM9/28/12
to refine...@googlegroups.com
What if you prefix that one with refinery.

Amit Patel

unread,
Sep 28, 2012, 6:54:06 AM9/28/12
to refine...@googlegroups.com
A typo in previous reply.

Below error occurs in 

app/views/refinery/_site_bar.html.erb  not in app/views/layouts/_navigation.html.haml

Amit Patel

unread,
Sep 28, 2012, 6:58:40 AM9/28/12
to refine...@googlegroups.com
Getting same error "NoMethodError in Refinery/admin/dashboard#index" 

sky21...@gmail.com

unread,
Sep 13, 2013, 4:55:37 AM9/13/13
to refine...@googlegroups.com


在 2012年9月28日星期五UTC+8下午6时58分40秒,Amit Patel写道:
Getting same error "NoMethodError in Refinery/admin/dashboard#index" 

On Friday, September 28, 2012 4:21:13 PM UTC+5:30, parndt wrote:
What if you prefix that one with refinery.

I got some problem , have you fixed this  and https://groups.google.com/forum/#!topic/refinery-cms/w-4VrfPewQY/discussion issue? 
Reply all
Reply to author
Forward
0 new messages