
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 · 644 阅读 · 0 评论 -
rails testing environment setup
在Gemfile中添加 group :development do gem 'rspec-rails', '2.6.1' end group :test do gem 'rspec-rails', '2.6.1' end bundle install原创 2011-08-06 09:51:41 · 756 阅读 · 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 · 720 阅读 · 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 · 587 阅读 · 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 · 610 阅读 · 0 评论 -
rails active record querying
Retrieving Multiple Objects in Batches find_each User.find_each(:batch_size => 5000) do |user| NewsLetter.weekly_deliver(user) end原创 2011-08-04 01:27:45 · 792 阅读 · 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 · 1119 阅读 · 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 · 1222 阅读 · 0 评论 -
rails active record associations
The has_many :through Association class Physician < ActiveRecord::Base has_many :appointments has_many :patients, :through => :appoin原创 2011-08-02 19:33:03 · 1054 阅读 · 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 · 1816 阅读 · 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 · 900 阅读 · 0 评论 -
rails web application deploy
$ heroku create $ git push heroku master $ heroku rake db:migrate If you want to push the data up, too, you can do so using the taps g原创 2011-08-01 12:32:07 · 689 阅读 · 0 评论 -
rails web 国际化
You can implement it like this in your ApplicationController: before_filter :set_locale def set_locale I18n.locale = extract_locale_原创 2011-07-31 20:11:41 · 530 阅读 · 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 · 836 阅读 · 0 评论 -
rails routes
If you want to route /posts (without the prefix /admin) to Admin::PostsController, you could use scope :module => "admin" do resources :posts, :comments endor resources :posts, :module =>转载 2011-08-02 13:11:02 · 1710 阅读 · 1 评论