Rails surprisingly does not include a validation method to make a model attribute immutable. (That is, the attribute can not be changed after it is set the first time.) I created this validation plugin to help that.
To install:
scr...
An introduction to haml
haml is template languages for Ruby on Rails. It’s a plugin that provides an alternative to Rails’ native view templating library erb. sass is included with haml, and provides templating for css fil...
About Fliqz
Fliqz is the leader in full-service, plug-and-play video solutions. The
company offers the most flexible video solutions available online,
providing seamless integration and full customization to companies of
any size. Fli...
Intended Audience
This is a guide to assist people who:
never used rails
have some experience
I’m not going to cover anything technical, just give some suggestions that I think made it easier for me to learn rail...
Ruby is an computer language to control the behavior of machines.
If that doesn’t make sense maybe this scenario will.
Real World Scenario
If you had a giant robot that would destroy the world, you’d need someway...
Rails App Directory Structure
Its important for you to become familiar with the folders of a rails app.
Create empty Rails App
Open in Terminal and create an empty rails app
Open the new rails directroy and get look at al...
Here is my hiring process for Rails developers. This continues some thoughts I shared in a guest blog post on Ruby Inside, called 11 Tips on hiring a Rails Developer.
1. Meet developer at a Rails Pub Nite (or similar). Collect the...
About Rails session stores
Sessions allow you to store objects in memory between requests. This is useful for objects that are not yet ready to be persisted, such as a Signup object constructed in a multi-paged process, or objects tha...
The guys at Rails Envy produced a series of “public service announcements” to help users better understand some of the things they should be aware of in their Rails projects. These videos are both entertaining and informative...
Gregg Pollack conducted nineteen (!!) video interviews with Railsconf presenters. They give an overview of what they presented, and hit on the key points of what they presented.
Railsconf in 36 minutes from Gregg Pollack on Vimeo
The following interview were conducted at Railconf in Portland, Oregon.
David Heinemeier Hansson
David is the creator of Ruby on Rails. He is a partner in 37signals, the company behind Basecamp, Highrise, Backpack, Writeboard, and ...
Here is the presentation file we’ve used for Toronto Ruby on Rails Project Night yesterday.
| View | Upload your own
Some useful links:
Railsconf 2008 in 36 minutes
MVC Public Service Announcements
Railsconf developer interv...
Opening hyperlinks the ‘Microsoft Way’
When you embed a link in a Microsoft word document, Word will use “Microsoft Office Protocol Discovery” to determine if the document can be edited by Word (via DAV for exa...
scaffold生成程序在 Mybook 目录下打开 DOS 命令行窗口,运行 ruby script\generate model bookrails 生成 Model 类 Book 的骨架文件book.rb。 在这里 Rails 将数据库中的books 表映射到 Book 类。 这里 Rails 再次使用了习惯约定,那就是数据库表以复数形式命名,而与之对应的 Model 类,使用单数形式。这里 rails 非常智能,它理解英文的复数规则,会自动将 person 类和...
For simple Ruby on Rails apps that use very few plugins, upgrading may be as simple as:
rake rails:update
For everyone else, there may be some work to do.
Step 1: Upgrade incompatible plugins and gems
Internally, Rails has un...
I’ve recently switched from using a straight up Apache mod_proxy + mongrel setup to Nginx + HaProxy +mongrel. Basically, mod_proxy is dumb as shit, and should never be used with mongrel + rails, especially with better options like ...
Rails partials are are fragments of template code that can be inserted into a view. They can really simplify template code, by factoring out repeated code.
For example, I often put forms into a partial so that the form can be shared b...
RubyCodingConvention
File Names
Directory and File names and Suffixes
Ruby source code
file/directory name is lower case class/module name with suffix ’.rb’.
ex.
Foo class => foo.rb
Bar module => bar.r...