Over my time of using Rails I’ve struggled with the placement of code that does not explicitly belong to a controller, model or view. My Java background probably had a lot to do with my selection of the lib dir for all ‘extra’ code when I first started.
Then I learned about plugins and loved [...]
Archive for March, 2008
Rails: Where do I put my code?
Posted in RubyOnRails on March 20, 2008 | 4 Comments »
Stage generator update
Posted in RubyOnRails, Stage on March 19, 2008 | Comments Off
I’ve updated stage to remove the automatic inclusion of unit tests. This is one step closer to adding in the choice between unit tests and rspec.
As always (like it’s been out for a long time), you can grab it here:
$ ./script/plugin install http://stonean.googlecode.com/svn/stage/trunk
For more info please see the original post.
MysqlUtils update
Posted in MysqlUtils, RubyOnRails on March 18, 2008 | Comments Off
I added a quick little feature to the mysql_utils plugin:
create_table :messages do |t| #some meaningful fields t.userstamps t.timestampsend
t.userstamps will add created_by (integer) and updated_by (integer) fields to your table.
Fusion
Posted in Fusion, RubyOnRails on March 18, 2008 | 4 Comments »
This is completely vaporware at the moment, but I wanted to throw this out there to see if anyone has any constructive comments.
Please note this is highly theoretical so don’t slam me too hard for missing functionality. :)
I have plans for a couple of applications that will share some of the same functionality. One [...]
MysqlUtils plugin
Posted in MysqlUtils, RubyOnRails on March 1, 2008 | Comments Off
Here’s a little plugin I wrote to help with MySQL migrations. Things like foreign keys, reference tables, join tables are easy to do. This isn’t really documented, but the code is pretty self explanatory. Here are a list of the methods:
def add_foreign_key(from_table, to_table, is_required = false)
def remove_foreign_key(from_table, to_table)
def remove_foreign_key_column(from_table, col_name)
def [...]
