Forum: Ruby on Rails RJS template eating encoding

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.
Patrick McCafferty (Guest)
on 2006-03-15 13:23
(Received via mailing list)
I was previously doing an update via .rhtml templates creating an AJAX
:evaluate_remote_response. I use UTF-8 in my pages, and my app
requires that I be able to, say, put Japanese characters in.

The problem is that when I switched this over to an RJS template it
started eating the encoding. I now get garbage characters where before
I got the correct ones.

The code for the RHTML:

<%= update_element_function(
		"front", :content => simple_format( h(@card.front_side))) %>
<%= update_element_function(
		"back", :content => simple_format( h(@card.back_side))) %>

and for RJS:

page.replace_html 'front', simple_format( h( @card.front_side ) )
page.replace_html 'back', simple_format( h( @card.back_side ) )


If I go to the action manually and check, in the RHTML version it has
the correct characters; in the RJS version it has the \312\342 escape
codes.

Any way to turn off the escaping?
Denise E. (Guest)
on 2006-03-15 21:44
(Received via mailing list)
Hi,

I want to launch a rails application from a regular .html page.  It
works just fine with apache on my web host provider's server but I
can't seem to figure out how to get the index.html to show up while
I'm running lighttpd and using http://localhost:3000/welcome.html/

Seems like a dumb question, but any help would be appreciated.

Denise
Ben R. (Guest)
on 2006-03-15 22:40
(Received via mailing list)
http://localhost:3000/welcome.html/ points to a directory called
welcome.html/

I guess I am unclear on what you mean by "Launch a rails application
from a regular .html page"

~ Ben

On 3/15/06, Denise E. <removed_email_address@domain.invalid> wrote:
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Ben R.
http://www.benr75.com
Denise E. (Guest)
on 2006-03-16 00:51
(Received via mailing list)
Hi,

What is mean is my ordinary everyday .html file has a form with a
submit button and on the submit button is the url for a rails
controller.  If the user clicks the button, the rails controller
evaluates values from the post and redirects him/her to the right
page within the app.  If the user never clicks the button, the rails
app is never launched.  Is that more clear?

Thanks,
Denise
This topic is locked and can not be replied to.