incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yohei Sasaki <yss...@gmail.com>
Subject Re: Javascript templating for shows/lists
Date Fri, 04 Dec 2009 14:38:32 GMT
Hi,

I'm from Rails to Couch. I use embeddedjs, too, because it is similar to ERB.

>Also no idea if it does html escaping of values - examining
>code leads me to believe it does not.

I think so, and I started to develop the library like ActionView.
http://github.com/yssk22/crayon

This library enables you to write as followings:

<%= h(var) %>
<%= text_field(doc, "path-to-field") %>

Thanks.

--
Yohei Sasaki
http://www.yssk22.info/

On 2009/12/04, at 17:30, Roger Binns wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Benoit Chesneau wrote:
>> embeddedjs works well here... which crash did you have ?
> 
> It is probably versioning or something.  The error text is:
> 
>  JavaScript function raised error: TypeError: regex.exec is not a function
> 
> I'm using CouchDB 0.10.0 on Ubuntu 9.10.  Embeddedjs doesn't look too
> promising anyway.  It is just Javascript embedded in text, but John Resig's
> code can do that too (and with way less code).  I do like the error
> reporting (line number and details) although that seems unlikely to work
> server side.  Also no idea if it does html escaping of values - examining
> code leads me to believe it does not.
> 
> Roger
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAksYyK0ACgkQmOOfHg372QQ82gCgr/9Gol0FLyDDGRcHyJW9qvjV
> zcUAn3kvWoBf9nc+E0TJLmyJUP95LcCo
> =/lQ6
> -----END PGP SIGNATURE-----


Mime
View raw message