2008-01-08
rails插件列表
关键字: rails
rails的插件列表
http://agilewebdevelopment.com/plugins/list
竟然有900多个插件!
下面是我用过的两个:
FileColumn
作用:文件上传,和rmagic综合试用
网页:http://www.kanthak.net/opensource/file_column/
Acts as attachment
作用:文件上传
网页:http://technoweenie.stikipad.com/plugins/show/Acts+as+Attachment
有时间把其它的翻译一下,看是干什么用的,以后就方便了!如果有路过的用过其它插件,就补充一下吧!
http://agilewebdevelopment.com/plugins/list
竟然有900多个插件!
下面是我用过的两个:
FileColumn
作用:文件上传,和rmagic综合试用
网页:http://www.kanthak.net/opensource/file_column/
Acts as attachment
作用:文件上传
网页:http://technoweenie.stikipad.com/plugins/show/Acts+as+Attachment
有时间把其它的翻译一下,看是干什么用的,以后就方便了!如果有路过的用过其它插件,就补充一下吧!
- 15:43
- 浏览 (751)
- 论坛浏览 (848)
- 评论 (3)
- 分类: rails
- 发布在 ror-party 圈子
- 相关推荐
评论
will_paginate:
这是在rails2.0时,替换paginate的插件
# install
#railsapp>ruby /script/plugin install svn://errtheblog.com/svn/plugins/will_paginate
# 替换以前的代码
@skus_pages,@skus = paginate :sku, :conditions => sql , :per_page => 30 , :order => "skuid"
替换为:
@skus = Sku.paginate :conditions => sql , :per_page => 30 , :order => "skuid",:page=>params["page"]
记得要增加:page=>params["page"],以前是不用的。
可能你会发现@skus_pages不见了,不用担心,它已经集成到了@skus中了
pages.current.previous => objs.previous_page
pages.current_page.number => objs.current_page
pages.current.next => objs.next_page
没有了pages.last , 但是可以考虑使用 objs.page_count
没有了pages.first , 但是可以考虑直接使用 1
willpaginate 多执行了一次统计总记录条数的sql语句,所以可以直接使用objs.total_entries 获取总记录数量。
这是在rails2.0时,替换paginate的插件
# install
#railsapp>ruby /script/plugin install svn://errtheblog.com/svn/plugins/will_paginate
# 替换以前的代码
@skus_pages,@skus = paginate :sku, :conditions => sql , :per_page => 30 , :order => "skuid"
替换为:
@skus = Sku.paginate :conditions => sql , :per_page => 30 , :order => "skuid",:page=>params["page"]
记得要增加:page=>params["page"],以前是不用的。
可能你会发现@skus_pages不见了,不用担心,它已经集成到了@skus中了
pages.current.previous => objs.previous_page
pages.current_page.number => objs.current_page
pages.current.next => objs.next_page
没有了pages.last , 但是可以考虑使用 objs.page_count
没有了pages.first , 但是可以考虑直接使用 1
willpaginate 多执行了一次统计总记录条数的sql语句,所以可以直接使用objs.total_entries 获取总记录数量。







评论排行榜