Sunday, June 26, 2011

Reserved Words You Can’t Use in Rails

It would be nice if the Rails generator fails to generate when you use the reserved words for a model. I wasted lot of time when I used words like monitor as a model name and class, type as an attribute for a model.

Here is a list of words that cannot be used

Wednesday, June 22, 2011

List of types to use in script/generate model

he attributes are SQL types, hence the following are supported:

* :primary_key
* :string
* :text
* :integer
* :float
* :decimal
* :datetime
* :timestamp
* :time
* :date
* :binary
* :boolean

Stolen from stackoverflow

How to remove a ignore a file in git that is already in git?

git rm --cached

Reference: Git