On Jun 10, 4:15 pm, teesea <t.co...@gmail.com> wrote:
> I've change the ajax posting from "data=some data" to "{data:'some
> data'}"

So if you do that then you will need to set the content-type to
application/json, or else rails will try to parse it as something else

Fred
>
> Hopefully thats what you meant
>
> Unfortunatley this hasnt changed the response, rails is still removing
> the spaces and new lines
>
> Is this what you mean?


>
> On Jun 10, 4:06 pm, Frederick Cheung <frederick.che...@gmail.com>
> wrote:
>
>
>
> > On Jun 10, 1:37 pm, teesea <t.co...@gmail.com> wrote:
>
> > > the echo action which the  requests are sent to simply removes the
> > > controller and action keys from params and then does
>
> > > render :text => params.to_json
>
> > > Anyone have any ideas what I'm doing wrong?
>
> > I think the way you're posting data is weird. You're taking a string,
> > encoding it as json but then submitting it as  a normal url encoded
> > post
>
> > Fred

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to