The Ruby on Rails way for Model naming

Following the comment from Graeme Mathieson on my last post on Rails-CMDB about the the Rails way for naming of columns within Models. I’m planning on doing the following column rename for the next release of Rails-CMDB:

rename_column :assets, :delivery_date, :delivered_on
rename_column :assets, :removal_date, :removed_on

rename_column :locations, :start_date, :started_on
rename_column :locations, :end_date, :ended_on

rename_column :purchase_orders, :o rder_date, :o rdered_on

rename_column :vendors, :last_order_date, :stopped_ordering_on

So the question for the Rails coders out there – does this seem correct ? There’s also a single table who’s primary field is not called name, so I guess to do it in the Rails way it should be changed as well.

I’ve also created about 90 unit test stubs and now just comes the hard part of coding the tests ;-)

Rails-CMDB release 0.2

Well it’s been a month since the first release of Rails-CMDB and it’s now time for another release. This is the rather large list of changes:

  • Added some unit tests for PurchaseOrder.
  • Added Export to CSV.
  • Added Import from CSV.
  • An asset can have many hardware items.
  • The Asset name does not need to be a number.
  • Catch trying to show a device that does not exist.
  • Add order_date column to PurchaseOrder Model.
  • Rename order_date column in Asset to delivery_date.
  • Correct typo’s in CreateNetworks which prevented loading of the schema.
  • Rename the database’s used to match the application name.
  • Added some simple doc’s on getting the system up and running.
  • Change to using host: 127.0.0.1 in database.yml instead of sockets.

The source code can be found here. Not sure what is going to be in the next version, however I expect it’ll not be ready for release until mid to late September.

Large stone foot (part of…)

We managed to escape the city over the bank holiday weekend. It was wonderful having no computers, internet or related reading.

There was also us wandering round Sheffield with my mother and visiting the city center for the first time in about 12 years. The effects of the flood a couple of months ago are still very much visible in many parts of the city.

I took a small small camera bag and managed to take some pictures in different places. We also took April over to Chatsworth House, where this picture of a large stone foot was taken.

In emergency pull ring

I’ve been very quiet so far this month, been busy with work, relaxing and a little reading. So here’s another photo from my last trip out.

This evening I have the flat to myself and a plan to work a little on CSV imports to Rails-CMDB. In the next couple of days (or the end of the weekend) there could very well be another release.

It would be an idea to shout real soon if you have used it and found any issues.