By default, there is no validation on the input on the form that we have created. The validation code shall be put in the model file. Oh, I just realize that I did not mention about MVC. MVC stand for Model-View-Controller. It is a kind of software pattern that separate the application into 3 components. The model is the application object, the controller defines the application interface, while the view defines the presentation. For more information, can go wiki to check it out. :) The model file resides in <root directory>/app/models. For my example, the file is blog/app/models/test_j.rb. The TestJ class is a sub class of ActiveRecord::Base . The attr_accessible is to specify what are the attributes can be updated. I tried to remove the tag from the attr_accessible and try to create a new record, this is the error observed. This is only experimental testing. I am not sure how this is to be done to have the error message displayed nicely instead of giving inter...
Previously known as jcrys26's kdb. A learning dump and sharing place.