
rails2
java_helpme
这个作者很懒,什么都没留下…
展开
-
paperclip学习使用笔记
paperclip 是rails处理附件的一个插件, 相对于以往的attachment_fu等在效率和使用上更胜一筹。 paperclip上传的图片附件如果不需要进行改变大小等操作, 则不需要安装ImageMagick。paperclip在window平台下进行图片处理很容易得到这样的错误信息 。。。is not recognized by the 'iden...2010-03-07 22:43:31 · 472 阅读 · 0 评论 -
【翻译】railscasts 136:jQuery
136: jQuery 原版railscasts ------------------------------------------------------------------------------------------------------------------------------ 翻译的过程中查询了一些资料,得知如果$.post()设置dataType为‘scri...2010-03-11 23:45:44 · 117 阅读 · 0 评论 -
笔记:named_scope的用法
转自 muyu 的bolg, 学习并记录以备日后查询使用。 named_scope 与 paginate 联合使用 class Product < ActiveRecord::Base named_scope :online, :conditions => {:status => 1}, :include => [:variants, :catalo...2010-03-15 23:03:34 · 136 阅读 · 0 评论 -
strip_tags
strip_tags(html) Strips all HTML tags from the html, including comments. This uses the html-scanner tokenizer and so its HTML parsing ability is limited by that of html-scanner. strip_tags...原创 2010-05-06 22:23:08 · 272 阅读 · 0 评论 -
利用paperclip实现kindEditoer的图片上传和浏览
KindEditor是一款优秀的开源HTML编辑器, 它的图片上传和浏览是利用插件的方式进行的。编辑器的参数中imageUploadJson定义了图片上传的后台程序地址, allowFileManager 定义了是否允许浏览服务器图片,fileManagerJson指定了浏览图片时后台程序地址。以下代码根据个人情况应该有所不同。 写道 {"error":1, "url"...2010-08-25 10:11:29 · 208 阅读 · 0 评论 -
nokogiri抓取网络资源
写道 Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among Nokogiri’s many features is the ability to search documents via XPath or CSS3 selectors.XML is like violence - if it doesn’t solve y...2010-08-25 10:18:20 · 200 阅读 · 0 评论