摘要: [代码] 阅读全文
posted @ 2009-08-20 14:21 麦飞 阅读(2311) 评论(0) 推荐(0) 编辑
摘要: Prototype是现在众多优秀的Ajax框架中最好的之一,它也是Rails默认的Ajax框架。 但这意味着在Rails上你只能使用Prototype么?当然不是!那使用其他的Ajax框架会很困难么?当然也不是! 在Rails上使用其他的Ajax框架其实难以置信的简单。就比如说jQuery吧,你所要做的全部就是把jQuery包放进public/javascripts目录,然后在你的layout文件... 阅读全文
posted @ 2009-08-20 11:37 麦飞 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 生成plugin骨架代码:Ruby代码 rubyscript\generatepluginMyPluginruby script\generate plugin MyPlugin功能需求:在BlogController中把所有符合条件的Post(Model)生成为xml如果不使用插件,很easy :in BlogControllerRuby代码 defexport_to_xmlposts=Post... 阅读全文
posted @ 2009-08-20 11:31 麦飞 阅读(474) 评论(0) 推荐(0) 编辑
摘要: 1.下载安装jQuery从http://docs.jquery.com/Downloading_jQuery下载最新version的jQuery.把下载下来的jQuery copy到public/javascripts目录,public/javascripts里面有些默认的JS文件可以delete掉,因为那些是Prototype/Script.aculo.us 的,我们不需要用到的.2.下载安装J... 阅读全文
posted @ 2009-08-20 10:56 麦飞 阅读(483) 评论(0) 推荐(0) 编辑