ruby on rails
文章平均质量分 54
lht1936
这个作者很懒,什么都没留下…
展开
-
ruby on rails 在ubuntu下的安装
1.首先安装一些基础库apt-get install curl git-core build-essential zlib1g-dev libssl-dev libreadline5-dev2.接着安装ruby虚拟机bash https://rvm.beginrescueend原创 2011-07-22 23:16:49 · 595 阅读 · 0 评论 -
rails testing environment setup
在Gemfile中添加group :development do gem 'rspec-rails', '2.6.1'endgroup :test do gem 'rspec-rails', '2.6.1'endbundle install原创 2011-08-06 09:51:41 · 700 阅读 · 0 评论 -
rails 3.1 assets route error
rails 3.1 采用特殊机制引用CSS和JS仅仅将CSS或JS放到public 或者 assets上,浏览器是无法获取到的解决方法如下:在Gemfile中添加gem 'sprockets', '= 2.0.0.beta.10'此方法适用于rails 3原创 2011-08-10 23:46:20 · 653 阅读 · 0 评论 -
yammer
rails console test> require './spec/support/blueprints' this will load blueprints, checkout the file which predefine objects for your te原创 2011-08-06 11:06:35 · 541 阅读 · 0 评论 -
rails tutorial--git
$ git config --global user.name "Your Name"$ git config --global user.email youremail@example.com$ git config --global alias.co checkoutgit原创 2011-08-01 00:31:19 · 565 阅读 · 0 评论 -
rails active record querying
Retrieving Multiple Objects in Batchesfind_eachUser.find_each(:batch_size => 5000) do |user| NewsLetter.weekly_deliver(user)end原创 2011-08-04 01:27:45 · 740 阅读 · 0 评论 -
rails action controller
default_url_optionsclass ApplicationController < ActionController::Base # The options parameter is the hash passed in to 'url_for' def d原创 2011-08-04 17:36:06 · 1065 阅读 · 0 评论 -
rails layout and rendering
Using render You can render the default view for a Rails template, or a specific template, or a file, or inline code, or nothing at al原创 2011-08-04 13:57:51 · 1169 阅读 · 0 评论 -
rails active record associations
The has_many :through Associationclass Physician < ActiveRecord::Base has_many :appointments has_many :patients, :through => :appoin原创 2011-08-02 19:33:03 · 996 阅读 · 0 评论 -
rails active record validation and callbacks
Active Record uses the new_record? instance method to determine whether an object is already in the database or not.The following meth原创 2011-08-02 17:08:29 · 1721 阅读 · 1 评论 -
rails migration tutorial
class AddReceiveNewsletterToUsers < ActiveRecord::Migration def self.up change_table :users do |t| t.boolean :receive_newslet原创 2011-08-02 14:39:58 · 849 阅读 · 0 评论 -
rails web application deploy
$ heroku create$ git push heroku master$ heroku rake db:migrateIf you want to push the data up, too, you can do so using the taps g原创 2011-08-01 12:32:07 · 635 阅读 · 0 评论 -
rails web 国际化
You can implement it like this in yourApplicationController:before_filter :set_locale def set_locale I18n.locale = extract_locale_原创 2011-07-31 20:11:41 · 480 阅读 · 0 评论 -
ubuntu rails 开发环境
1. 先下载我的rails项目设置机子上的git,说明在此:http://help.github.com/linux-set-up-git/然后在想要保存项目的目录下执行下列命令:git clone git@github.com:gitfly/Quan.git 被原创 2011-07-30 23:51:02 · 768 阅读 · 0 评论 -
rails routes
If you want to route /posts (without the prefix /admin) to Admin::PostsController, you could usescope :module => "admin" do resources :posts, :commentsendorresources :posts, :module =>转载 2011-08-02 13:11:02 · 1632 阅读 · 1 评论