TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

IncludeJS - Use CommonJS modules inside Ruby/Rails

2 点作者 JustAGeek大约 14 年前
A friend of mine found himself in the situation of having to implement the same business logic in both Javascript and Ruby.<p>So he wondered how to get rid of that duplication. The solution he came up with is IncludeJS which allows you to implement something in Javascript and use that code _both_ in Javascript and in Ruby.<p>He gave a talk on this topic during RailsConf2011, which provides some more details: http://en.oreilly.com/rails2011/public/schedule/detail/1941

1 comment

JustAGeek大约 14 年前
A friend of mine ran into the situation of having to implement the same business logic in both Javascript and Ruby.<p>He wondered how to get around this and his solution is IncludeJS which allows to write the business logic in Javascript and use this code in BOTH Javascript and Ruby. He gave a talk about this during the Railsconf 2011, here's the URL where you can find the abstract and slides which provide some more details about this:<p><a href="http://en.oreilly.com/rails2011/public/schedule/detail/19412" rel="nofollow">http://en.oreilly.com/rails2011/public/schedule/detail/19412</a>