# In\_place\_editing won't update, keeps saving

**URL:** <https://www.ruby-forum.com/t/in-place-editing-wont-update-keeps-saving/150249>\
**Category:** Rails\
**Created:** [October 6, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/in-place-editing-wont-update-keeps-saving/150249 "2008-10-06T16:04:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CompUser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecb155/32.png) [@CompUser](https://www.ruby-forum.com/u/CompUser)\
**Post date:** [October 6, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/in-place-editing-wont-update-keeps-saving/150249/1 "2008-10-06T16:04:29Z")

</div>

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%\>

---

<div class="post-metadata">

**Author:** ![CompUser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecb155/32.png) [@CompUser](https://www.ruby-forum.com/u/CompUser)\
**Post date:** [October 6, 2008, 5:26pm UTC](https://www.ruby-forum.com/t/in-place-editing-wont-update-keeps-saving/150249/2 "2008-10-06T17:26:56Z")

</div>

CompUser wrote:

Have you checked in your log files to see if any kind of error is being  
thrown?

---

<div class="post-metadata">

**Author:** ![CompUser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecb155/32.png) [@CompUser](https://www.ruby-forum.com/u/CompUser)\
**Post date:** [October 7, 2008, 9:56am UTC](https://www.ruby-forum.com/t/in-place-editing-wont-update-keeps-saving/150249/3 "2008-10-07T09:56:32Z")

</div>

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/](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 N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![CompUser](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecb155/32.png) [@CompUser](https://www.ruby-forum.com/u/CompUser)\
**Post date:** [October 7, 2008, 10:27am UTC](https://www.ruby-forum.com/t/in-place-editing-wont-update-keeps-saving/150249/4 "2008-10-07T10:27:35Z")

</div>

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
