create object after before_filter :authenticate_user!

25 views
Skip to first unread message

oto iashvili

unread,
Feb 14, 2013, 7:05:14 AM2/14/13
to rubyonra...@googlegroups.com
hi

I use devise and cancan

my model

class PostsController < ApplicationController
  before_filter :authenticate_user!, only: [:create, :update, :destroy]
...
end

so an unauthentificate user can access new post form. Now when unauthentificate user submit new or edit forms, he is redirected to login form. But when he logs in, his post is not save in database. Is there anythings to do such as callback if I want the post to be saved ?

thanks
Reply all
Reply to author
Forward
0 new messages