自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

hit4

[code="ruby"]class FileUpload < ActiveRecord::Base has_attachment :size => 1..1.megabyte, :path_prefix => "public/uploadedfiles", :storage => :file_system endclass Post...

2008-12-02 14:41:08 143

rails hit three

[code="ruby"]Titledef list sort_by=params[:sort_by] @book_pages,@books = paginate :books,:order => sort_by, :per_...end#no ajax order#change gem to plugincd vendor/pluginsgem unp...

2008-09-10 14:50:12 79

rails hit two

[code="ruby"]#counter_cachein father table sons_count:integerin son model belongs_to :father,:counter_cache => true#select a category or create oneattr_accessor :new_category_one #...

2008-09-03 16:37:14 97

rails hit one

[code="ruby"]//has_and_belongs_to_many link by middle table has_many :moderators, :through => :moderatorships, :source => :user, :order => "#{User.table_name}.login" ...

2008-08-29 13:15:24 84

Php Encoding

Mysql using utf8;so when Rails and Php query records fromtables should set encoding=utf8;about Rails refer another article;and the php,first be sure the editor save php file set theencoding utf8;...

2007-10-18 15:16:40 130

How to install Smarty in Windows

Installing Smarty in WindowsThis document assumes that your webserver and php5 isrunning.Download Smarty - http://smarty.php.netInstallation - Windows, IIS/Apache, PHP5Extract files, rename Sm...

2007-10-17 11:36:44 57

Rmagic

http://rubyforge.org/frs/download.php/6276/RMagick-1.9.2-IM-6.2.4-6-win32.zipcd D:\Downloads\rails\RMagickunzip RMagick-1.9.2-IM-6.2.4-6-win32.zipcd D:\Downloads\RMagick\RMagick-1.9.1-IM-6.2.3-win...

2007-09-12 00:56:43 128

Rails日志文件

rails的日志文件存在于app/log下面。对于不同环境产生的日志内容会有差别。development下会把每次对数据库的访问代码包含进去,production会省略,不过也有很多的内容。 在environment.rb中有config.log_level =:debug如果只希望在production环境下,输入少量的log,则只需要在config/environments/p...

2007-09-03 02:09:44 95

will_paginate的使用

rails自带的分页功能有限,加上will_paginate插件能够很强的增加功能 1.一对多的分页最简单:比如一个类目下很多文章,要显示气象学下的所有文章并20篇分为一页:def show  @category =Category.find(params[:id],:include=&gt;:papers])                @papers=Paper.pagina...

2007-08-23 14:12:56 106

回到了windows的环境

用ubuntu一个月,终于回到了windows.不是ubuntu,我很喜欢她,美丽,快捷,方便,动感。可是再好的不适合我,也是不能久留的。 ubuntu是个很棒的系统,forum.ubuntu.org.cn是一步步伴随我学会使用他的。自己刻盘安装(iso刻为镜像文件才能通过光驱启动)--安装scit,jdk,mysql,netbeans,sopcast,virtualbox,aruzus,...

2007-08-21 13:53:35 56

ubuntu add/remove software by command

Ubuntu软件安装与删除相关命令安装软件命令: apt-getinstall softname1 softname2 softname3……卸载软件命令: apt-get removesoftname1 softname2 softname3……卸载并清除配置命令: apt-get remove--purge softname1更新软件信息数据库命令: apt-getup...

2007-07-20 07:05:46 182

Netbeans6界面字体的修改

Netbeans6 的界面字体太小了,看得眼睛疼,修改成12比较好。 /安装目录/etc/netbeans.conf是保存基本配置的地方,只有从这里才能修改字体。 netbeans_default_options="-J-Xms32m -J-Xmx256m-J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none-J-Dapp...

2007-06-08 15:41:41 218

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除