Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace-vars {:id 1} failed #69

Closed
zhuomingliang opened this issue Jul 11, 2013 · 2 comments
Closed

replace-vars {:id 1} failed #69

zhuomingliang opened this issue Jul 11, 2013 · 2 comments

Comments

@zhuomingliang
Copy link

I had

<td>${id}</td>

in html, when I do

replace-vars {:id 1}

it failed with

java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
@cgrand
Copy link
Owner

cgrand commented Jul 11, 2013

The values are expected to be strings.
It's half intentional to force the user to format.
Granted it's annoying.

On Thu, Jul 11, 2013 at 11:39 AM, Jimmy Zhuo notifications@github.comwrote:

I had

${id}

in html, when I do

replace-vars {:id 1}

it failed with

java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String


Reply to this email directly or view it on GitHubhttps://github.com//issues/69
.

On Clojure http://clj-me.cgrand.net/
Clojure Programming http://clojurebook.com
Training, Consulting & Contracting http://lambdanext.eu/

@zhuomingliang
Copy link
Author

Thanks, I fixed by

(update-in {:id 1} [:id] #(.toString %))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants