bradwrage blogg

About

sandals


Living and working in the Bay Area. Married to the most incredible woman. Resolved to live each and every day for the Lord.

Links

Twitter

    Me Elsewhere

    SQLite over MySQL

    Photobucket

    After following a tuturial on rails that used mysql for development I’m moving onto something much more easier and robust.  Being able to create a database in an app simply by using the $rake db:create, then creating the controllers, views, and models using the $rake db:migrate to generate the mysql table structure is awesome.  For more on this awesome easy setup check out the rails guides.



    April 05, 2009, 7:05pm   Comments

    Rails error message

    To show a helpful error message in rails simply put

    <%= error_messages_for( :class = ‘action’) %> in the view that you want the error message to show.  Now this will work when you have some validation code in your model related to the view.  For example “validates_presence_of :title :artist”.  So when a user forgets to enter in the required fields they will be notified which fields they left out.



    March 18, 2009, 11:06am   Comments