Forum: Ruby on Rails in_place_editing won't update, keeps saving...

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
281340581911a553704f89de8b51d206?d=identicon&s=25 CompUser (Guest)
on 2008-10-06 16:04
(Received via mailing list)
Hey lads,

I'm stuck!! implementing in_place_editing is simple, according to many
tutorials. but i can't find out what i'm doing wrong. I can edit the
text, but when I hit the "Ok" key, the "Saving..." part comes up and
nothing happen. any idea's? Thanks!!

controller
  in_place_edit_for :blog_post, :content

  def set_blog_post_content
    post = Blog::Post.find(params[:value])
    render :text => post.content
  end

view

<%  @blog_post = @post%>
<%= in_place_editor_field :blog_post, :content%>
C4bfcc81ac9281cb905f38e97e4d4e0b?d=identicon&s=25 Shandy Nantz (snantz)
on 2008-10-06 17:26
CompUser wrote:

Have you checked in your log files to see if any kind of error is being
thrown?
281340581911a553704f89de8b51d206?d=identicon&s=25 CompUser (Guest)
on 2008-10-07 09:56
(Received via mailing list)
Hmm you're right, get this error:

ActionController::InvalidAuthenticityToken
(ActionController::InvalidAuthenticityToken):

I know i saw this error on other side's and found a patch (http://
dev.rubyonrails.org/attachment/ticket/10055/
in_place_editing_should_work_with_csrf_and_rjs.patch) but this didn't
solve the problem. Still get the error as showen above

On 6 okt, 17:26, Shandy Nantz <rails-mailing-l...@andreas-s.net>
281340581911a553704f89de8b51d206?d=identicon&s=25 CompUser (Guest)
on 2008-10-07 10:27
(Received via mailing list)
Oke have it working now, not complete DRY. Because I used namespaces
and named routes my routing to the right variable was corrupt. But
fixed the namespace issue and it works fine for me now. Thanks for
your help!!
grtz
This topic is locked and can not be replied to.