`
xxj
  • 浏览: 434536 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表
这个并不是一个完整的插件,仅供娱乐:) 其实这也是个简单的插件制作过程,本插件依赖will_paginate 一:新建Project rails ajax_paginate_demo 地球人都知道这个是干嘛的,不说了 二:安装will_paginate插件 http://mmm.iteye.com/blog/116931 三:制作我们的ajax_paginate插件 ruby script/generate plugin ajax_paginate 并且在lib下新建ajax_paginate目录,目录如下图 修改init.rb require 'ajax ...
项目中涉及到地图数据,需要经纬度数据,在google搜索了一下,有文本的,但是还不能直接应用。刚刚跑了遍程序将已经整理好的文件分享给大家,希望对大家有用。 呵呵,数据来源于网络,现在该我回馈的时候了:) 主要做了如下的处理: 一:生成xml文件,提取出省份,城市,经度,纬度 二:省,市是中文的,不便查询,将之转换为拼音,导入数据可以直接做为keycode (部分重复,或错误可能是程序没能正确识别,请自行调整) 格式如下: <?xml version="1.0" encoding="UTF-8"?> <ponits> ...
cache是系统中必不可少的东西,那么cache的有效期,何时清除过时的cache就显得更加有意思的一个话题。Sweeper Generator 顾名思义是一个Generator,清除过时的cache 0:) cache Rails中目前有三种cache caches_pages caches_action caches_fragment cache还 ...
0:Routing Navigator 是什么 你了解Routes 了吗?你对 map.home '',:controller=>'welcome' 了解吗?你知道它生成什么样的helper方法么? 这个呢? map.resources :forums 更复杂一点的呢? map.resources :forums do |forum| forum.resources :topics end map.namespace(:admin) do |admin| admin.resources :forums end ...
今天在http://agilewebdevelopment.com/plugins/crud_generator_2无意中发现的,下载下来使用了一下,感觉蛮有趣的。 CRUD Generator 2 是什么? CRUD Generator 2 正如标题,是一个生成代码的脚手架,增删改查,和我们rails自带的resource scaffold一样,都生成基于rest的代码 一:安装 ruby script/plugin install http://crudgenerator2.googlecode.com/svn/trunk/crud_generator2 二:生成 ruby scri ...
感谢gigix推荐这么实用的插件:http://www.iteye.com/topic/36627#296988记录下来 因为在项目中用到gmail,而gmail的smtp又是带ssl认证的,Rails的Action Mailer是实现不了的。如果你也碰到这样的问题,或者也打算用gmail smtp,这个插件也许是你想要的。 0:前提 还没了解ActionMailer?那就先看看这里 ActionMailer:http://wiki.rubyonrails.org/rails/pages/ActionMailer 1:安装 ruby script/plugin install htt ...
Rails2.0中原pagination将被移出作为插件classic_pagination,will_paginate是个非常不错的替代方案 一:安装 ruby script/plugin install svn://errtheblog.com/svn/plugins/will_paginate 二:使用 Controller @posts = Post.paginate_by_board_id @board.id, :page => params[:page]||1 如我们以前的find一样 在View中显示分页 <%= will_paginate ...
  Exception Notifier Plugin功能:当你的Rails Application出错时,Exception Notifier会向指定的email发送日志 一:安装 ruby script/plugin install exception_notification 二:使用 1:) 在config/environment.rb增加邮件接收者的地址 ExceptionNotifier.exception_recipients ...
Theme Support 是一个支持多皮肤的插件,是从typo中抽取出来的 一:安装 千篇一律:( ruby script/plugin install [url]http://mattmccray.com/svn/rails/plugins/theme_support[/url] 二:使用 /vendor/plugins/theme_support/lib/patches/routeset_ex.rb 不能正常执行,需要稍作修改 1:修改 /vendor/plugins/theme_support/init.rb 去掉 require 'patches/routeset_e ...
是看到robbin的帖子提到这个插件,下载下来改了一下,使用感觉还不错 http://agilewebdevelopment.com/plugins/bbcodeizer http://agtools.rubyforge.org/bbcodeizer/ BBCodeizer是用来将UBB代码转换为html的Rails插件,通常情况下,我们不喜欢客户能直接通过html编辑帖子或者发言,但是我们又不想局限于普通的text_area的输入框,总想着加点什么,譬如让用户可以调整字的大小,可以让用户插入图片,可以引用上面用户的言语,可以..... 那太好了,也许BBCodeizer就是你想要的插件之 ...
Simple map.resources :users, :sessions Nested map.resources :teams do |teams| teams.resources :players end Customized map.resources :articles, :collection => {:sort => :put}, :member => {:deactivate => :delete}, :new = ...
刚刚在rails的CHANGELOG中看到这样一个小的改动 旧的写法 belongs_to :visitor, :class_name => 'User' # => inferred foreign_key is user_id 新的写法 belongs_to :visitor, :class_name => 'User' # => inferred foreign_key is visitor_id 这样我就不需要指明外键author_id class Article belongs_to :author,:class_name=>'User' ...
Module ActionView::Partials 引用Partials can have their own layouts applied to them. These layouts are different than the ones that are specified globally for the entire action, but they work in a similar fashion. Imagine a list with two types of users:    <!-- app/views/users/index.html.erb --&g ...
看着他一个劲的在后台跳着感觉不爽,能不能规矩点,学学google.难道真的这么不知好歹让俺下手嘛
引用不同与其他地方, 我们只提供和城市生活相关的信息,我们的信息是有“所有权”的。  我们所有的信息都由用户提供、用户拥有、用户使用,我们所有的收益都和用户分享。我们的目标就是大家一起来,将现实世界中所有的城市信息准确、全面、及时地反映在Recity中。 Recity.net 再次上线,虽然还有很多事情要做,但是已经基本成型了,可以拿出来了:)欢迎大家多提点宝贵意见 附上截图
Global site tag (gtag.js) - Google Analytics