Problems adding Devise model to a RefineryCMS app -
i'd add devise model refinerycms app allow customer log in , manage profile. seems reasonable since customer has nothing cms. since refinerycms uses devise, thought simple thing do. i'm starting blank slate, not integrating existing app.
steps reproduce issue i'm having:
$ refinerycms my_fun_app $ cd my_fun_app $ rails generate devise customer $ rake db:migrate
after doing steps above fire app (using rails server
) , go http://localhost:3000
prompted create refinery user. well.
the problem when go http://localhost:3000/customers/sign_up
nomethoderror
:
undefined method `customer_registration_path' #<actiondispatch::routing::routesproxy:0x00000003cc9810>
the error raise line in /home/tom/.rvm/gems/ruby-2.0.0-p0/gems/devise-2.0.5/app/views/devise/registrations/new.html.erb:
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) |f| %>
any ideas on how remedy this?
this known issue refinerycms based on devise , setups devise own way:
devise.setup |config| # please not change router_name away :refinery # otherwise refinery may not function properly. thanks! config.router_name = :refinery end
so inside devise, url helpers couldn't find 1 defined in app.
there seems no official solution problem , refinerycms guys working on may fixed in future releases. however, there 1 article regarding how integrate refinery , devise existing rails 3.2 app, may give thoughts: http://sdownie.com/blogs/integrating-refinery-rails-3-2-into-your-existing-rails-app.
hope helps.
Comments
Post a Comment