Posts Tagged ‘ activerecord ’

May 20, 2010: Fontastic

2010/05/20
By noelrap
May 20, 2010: Fontastic

Book Status Starting to sound repetitive. Still working on the Cuke chapter, this time focusing on cleaning up the parts where I recommend ways to use Cucumber. Still hoping for a beta early next week. Other things This week in Yehuda, there’s a very long article about text encodings and what problems they have,...
Read more »

Tags: , , , , , , ,
Posted in Publishers, Rails Prescriptions | View Comments

Double Shot #523

2009/08/21
By Mike Gunderloy
Double Shot #523

There’s early and then there’s insanely early.master_slave_adapter – Nice approach to doing master-slave databases in Active Record through a custom adapter that dispatches the database calls. Online Viewstate Viewer / Decoder for Asp.Net 2.0 – I didn’t think I’d need this sort of thing any more. I was wrong. looksee – Library to examine the method...
Read more »

Tags: , , ,
Posted in A Fresh Cup, Publishers | View Comments

ActiveRecord refererential integrity is broken. Let’s fix it!

2009/08/18
By Jon
ActiveRecord refererential integrity is broken. Let’s fix it!

ActiveRecord supports cascading deletes to preserve referential integrity:1 2 3class User has_many :posts, :dependent => :destroy endBut you really only want cascading deletes about half the time. The other half, you wa...
Read more »

Tags: ,
Posted in Publishers, Rail Spikes | View Comments

Using model constants for project sanity

2009/06/22
By Robby Russell
Using model constants for project sanity

On one of our larger client projects (approx. 160 models and growing…) we have a specific model that we refer to quite a bit throughout our code. This model contains less than 10 records, but each of them sits on top of an insanely large and complex set of data. Each record refers to...
Read more »

Tags: , , , , , , , ,
Posted in Publishers, Robby on Rails | View Comments

Today’s hard-won lesson

2009/03/05
By Luke Francl
Today’s hard-won lesson

An float subtracted from an integer results in a float. When typecast by ActiveRecord, this is converted to an integer.validates_numericality_of with :only_integer => true results in a rather obscure error message if a non-integer i...
Read more »

Tags: ,
Posted in Publishers, Rail Spikes | View Comments

[PLUGIN RELEASE] ActsAsOverflowable

2008/07/09
By John Constable
[PLUGIN RELEASE] ActsAsOverflowable

acts_as_overflowable

Written by Nicholas Lega

== DESCRIPTION:

Allows a column to overflow data into a secondary column if the data size exceeds the character limit. This is useful for fast indexing.

Instead of trying to index text blobs, you can specify a varchar column to be used for indexing. ...
Read more »

Tags: , , , ,
Posted in Publishers, Revolution On Rails | View Comments

[PLUGIN RELEASE] ActsAsSeoFriendly

2008/06/19
By Jeffrey
[PLUGIN RELEASE] ActsAsSeoFriendly


ActsAsSeoFriendly

== DESCRIPTION:


Create an SEO friendly field for a model automatically based on a given field.

So if you have a Blogs model, and you would like create an SEO friendly version
of the 'title' field, you would just add this to your model and then be able toRead more »

Tags: , , , ,
Posted in Publishers, Revolution On Rails | View Comments

Acts As Fast But Very Inaccurate Counter

2007/05/25
By Val Aleksenko
Acts As Fast But Very Inaccurate Counter

Introduction

If you have chosen the InnoDB MySQL engine over MyISAM for its support of transactions, foreign keys and other niceties, you might be aware of its limitations, like much slower count(*). Our DBAs are in a constant lookout for slow queries in production and the ways to keep DBs happy so...
Read more »

Tags: , , ,
Posted in Publishers, Revolution On Rails | View Comments

Plugin I Cannot Live Without

2007/05/11
By Val Aleksenko
Plugin I Cannot Live Without

The Enhanced Rails Migrations plugin was written to end the constant battle we had with clashing names in db migrations within our large development team. We tried everything: special commit policies, rake tasks, even claiming the next migration number in subversion. Nothing worked and CI server was sending 'broken build due to conflicting...
Read more »

Tags: , , , , ,
Posted in Publishers, Revolution On Rails | View Comments

Moving models to a different database

2007/05/09
By Val Aleksenko
Moving models to a different database

There many reasons to use multiple databases (DBs) and when this is done, there is often a case when a model needs to be moved from one DB to another. The impetus could be that part of the data is referential and this is being reflected by moving it to a read-only DB. Another...
Read more »

Tags: , , , , ,
Posted in Publishers, Revolution On Rails | View Comments