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

有时间把其它的翻译一下,看是干什么用的,以后就方便了!如果有路过的用过其它插件,就补充一下吧!
评论
hellosoft 2008-01-09   回复
acts_as_versioned:
这个是用来自动作历史记录的插件,也不错。
hellosoft 2008-01-09   回复
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 获取总记录数量。
donner 2008-01-08   回复
RSpec
作用:替代Rails自带的Test
网站:http://rspec.info
发表评论

提醒: 该博客已发表在公共论坛,博客所有留言会成为论坛回贴,留言请注意遵守论坛发贴规则

您还没有登录,请登录后发表评论

mengwade
搜索本博客
我的相册
De5e9417-a73e-3f86-91f7-57c5a3a0cdb8-thumb
未命名
共 1 张
最近加入圈子
存档
最新评论