A A
RSS

Tag Archive | "rails"

How To Use Fixtures to Populate Your Database in Rails

Friday, July 11, 2008

0 Comments

UPDATE: I’ve been using this method for awhile now: http://railspikes.com/2008/2/1/loading-seed-data Seed data is data that the app is dependent on. It is data that has to exist if you were to wipe the database clean and reload your schema. Some examples would be a list of cities/states, a list of categories, or the initial ‘admin’ user [...]SHARETHIS.addEntry({ title: "How To Use Fixtures to Populate Your Database in Rails", url: "http://biodegradablegeek.com/2008/07/how-to-use-fixtures-to-populate-your-database-in-rails/" });

Introduction to Validations & Validation Error Handling in Rails

Friday, February 8, 2008

3 Comments

Validations in Ruby on Rails are essentially nothing more than methods that ensure that the data in a model is valid before saving it to the database. Traditionally, we validate data coming in using conditional expressions (for example, if email != NULL or if passwd==passwd_confirmation). This task is essential, but boring and tedious, but Rails’ [...]SHARETHIS.addEntry({ title: "Introduction to Validations & Validation Error Handling in Rails", url: "http://biodegradablegeek.com/2008/02/introduction-to-validations-validation-error-handling-in-rails/" });

Understanding Basic Database Relationships in Rails

Wednesday, December 26, 2007

11 Comments

This short tutorial will be beneficial for you if database relationships and keywords like belongs_to and has_many confuse you, or if you’re trying to find out how relationships are implemented in Rails. As we create a small demonstration project, you’ll see that one beauty of Rails is how it does most of the work gluing [...]SHARETHIS.addEntry({ title: "Understanding Basic Database Relationships in Rails", url: "http://biodegradablegeek.com/2007/12/understanding-basic-database-relationships-in-rails/" });

Using Vim as a Complete Ruby on Rails IDE

Thursday, December 13, 2007

20 Comments

NOTE: If you are experiencing segmentation faults with vim and rails.vim, see this post. When coding in Ruby on Rails, you’ll usually be switching between files and running scripts a lot. It can be time-consuming and frustrating coding Rails using a traditional text editor designed for working on big files individually. Vim lets you hop around [...]SHARETHIS.addEntry({ title: "Using Vim as a Complete Ruby on Rails IDE", url: "http://biodegradablegeek.com/2007/12/using-vim-as-a-complete-ruby-on-rails-ide/" });