开发者

Using on_the_spot gem immediately logs out user

I have finally gotten the on_the_spot gem working in my rails app, which uses devise for authentication.

But, when a user is logged in, making an edit on the user 'show' page results in them being immediately logged out after the change is made (and saved). My guess is that this is to do with routes.rb?

  get "users/ind开发者_运维技巧ex"

  get "users/show"

  devise_for :users, :controllers => { :registrations => :registrations }
  devise_for :users
  resources :users
  root :to => "home#index"

  match '/:id' => 'users#show'

  resources :users do
    collection do
      post :update_attribute_on_the_spot
    end
  end

Are there any obvious errors in this that would cause my problem? Or should I be looking elsewhere? I'm using Rails 3.0.10 and the latest versions of Devise/on_the_spot.

Many thanks!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜