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%>
CompUser wrote:
Have you checked in your log files to see if any kind of error is being
thrown?
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 N. [email protected]
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