`
zhao_j_long
  • 浏览: 3510 次
  • 性别: Icon_minigender_1
  • 来自: 唐山.
社区版块
存档分类
最新评论
文章列表
左百度,右google。终于找到了实现中文错误提示的办法,参考的帖子为 http://www.iteye.com/topic/280917 http://www.iteye.com/topic/469505 因为是简单的程序,提示错误在一起还是可以的,所以采用了第一个帖子的方法,虽然我只要中文,不需要英,法,日,德的提示,还是用i18n这个大刀来实现中文错误提示。 首先安装插件i18n_generators 1.在DOS窗口下,输入下面命令,会安装getText2.1.0,安装时同时会安装locale-2.0.5 gem install gettext 2.安装i18n_generators插件 ...
看了较多的中、英文教程,书中代码也照猫画虎,练了一下,终于到了可以出师的水平!(自我感觉) 先来一个商品图片的程序练练手,有3多万种商品,分成1200各小类,然后把每个商品的图片上传。模型分为categry,product,photo 和user,做为用户登录管理。万事具备,go! 前提: 我的开发环静为windows2003 + instantRails(Rails版本2.3.4) + vim(电脑运行netbean有点慢),当前目录为e:\railsProject 1.生成项目,进入程序的目录(e;\railsProject\Photo_Gallery) rails Photo_Gal ...
def test_about get :about title = assigns(:title) assert_equal "About RailsSpace", title [color=blue]assert_response :success[/color] assert_template "about" end assert_response :success #判断返回正确,书中的解释为 HTTP uses a numeric code to indicate the response type; the code ...
正在看railsspace_building_a_social_networking_website_with_ruby_on_rails一书,Rails_Space的测试代码,在测试时发现用下列验证输入信息过长的错误。在Rails2.2.2中发生错误。 error_messages = ActiveRecord::Errors.default_error_messages sprintf(error_messages[:too_long], length) 经查看代码,在rails-2.0前,可以把default_error_messages中%d替换成数字。 在Rails2.2.2中,def ...
Global site tag (gtag.js) - Google Analytics