Today I will try to put down some basic changes that ActionMailer got with Rails 3. Using a mailer model and a view, ActionMailer allows you to send emails from Rails application. Mailers get inherited from base class of ActionMailer i.e ActionMailer::Base and views reside with controller views. Generating a mailer is simple. $rails g […]Read more "Rails 3 – Action Mailer"
I have not been able to put this post up for quite some time now. Actually this has to do with mysql gem installation issue on Mac OSX 10.6 (or later). Initially there were issues with mysql gem installationl. Once it got installed and I ran my app, I got the not so famous “uninitialized […]Read more "MySQL + Gem – MySQLCompat Error Solution"
Just came across the Ruby on Rails 3.0 Beta release. There are a lot of exciting new features and it all seems exciting. Something that caught my eye was Active Model and new validations. So here I am, jotting them down for myself and all those who might be interested in reading about it. New […]Read more "Ruby on Rails 3.0 – Active Model and New Validations"
With the new face of Rails (Rails 2.1 and beyond), came the change in the way migrations used to work. So lets see some of the changes that went into migrations (that is when Rails was 1.2.3)… the then and now changes … First of all, serial numbers for migrations are gone and they have […]Read more "Migrations: Did they mature with Rails 2.1.#"
I am back on track .. track of writing something new here… and this time it is Migrations .. Rails Migrations .. As you must be knowing (u all Rails enthusiasts) that migrations allow you to make changes to your database schema. In doing so, you also get the facility of moving from version x […]Read more "Migrations"
rake cache:clear # Clears all cached pages rake db:bootstrap # Loads a schema.rb file into the database and then loads the initial database fixtures. rake db:bootstrap:copy_default_theme # Copy default theme to site theme rake db:bootstrap:load # Load initial database fixtures (in db/bootstrap/*.yml) into the current environment’s database. Load specific fixtures using FIXTURES=x,y rake db:fixtures:load # […]Read more "Rake Tasks"
Some useful rake commands: rake migrate version=0 rake test:units rake test:functionals rake annotate_models rake db:sessions:clear rake doc:app rake log:clear rake db:test:prepare -> prepares test database with development database schema rake -T #displays all rake tasks with description Generators: ruby script/generate model ModellName ruby script/generate controller ListController show edit ruby script/generate scaffold ModelName ControllerName ruby script/generate […]Read more "Rails Stuff"