If you’re running a recent version of Rails, the PostgreSQL ActiveRecord adapter has been updated, requiring an updated Pg driver. If you were previously using putline for doing a PostgreSQL COPY inside of Ruby, you’ll need to change two method calls accordingly if you’re getting an exception:
undefined method `putline’ for #<PGconn:0xb63968e8>
In a migration, I [...]
By default, ExtJS allows you to specify fields which cannot be blank. However, there is no indication to the user that a field is required. Fortunately, with a little monkey patch, it’s easy to add a required form field indicator:
Ext.apply(Ext.layout.FormLayout.prototype, {
originalRenderItem:Ext.layout.FormLayout.prototype.renderItem,
renderItem:function(c, position, target){
if(c && !c.rendered [...]
It’s not quite as intuitive as you’d expect.
cb.store.removeAll();
// force the reload on trigger
cb.lastQuery = null;
The above assumes you keep your Ext.Form around, even after you close an Ext.Window containing the form. If the form is actually destroyed on close, the default, your Combo will be recreated anew. The above is more useful [...]
Today, I discovered that the CheckboxSelectionModel does not clean up after itself on a store reload. If you previously used the header checkbox that selects all records, if you reload the store for whatever reason — I reconfigure my grid with a new store all the time — the header is left checked.
I found [...]
I found this interesting. If you use an after_initialize hook in an ActiveRecord model for some reason and you hit upon one of the attribute accessor methods, the following exception may reveal itself.
ActiveRecord::MissingAttributeError: missing attribute:
Specifically, I came across it when referencing the has_many side of an association from within a belongs_to model. For [...]
Like many small businesses, we’ve been using credit cards when necessary to fund operations. It’s no surprise that BoA just sent us a change to our perpetually self modifying cardholder agreement stating our APR on purchases is rising 4%. Not as bad as I’ve seen happen to others, but ridiculous nonetheless.
Ultimately as these [...]
The Obama administration is engineering its new bailout initiatives in a way that it believes will allow firms benefiting from the programs to avoid restrictions imposed by Congress, including limits on lavish executive pay, according to government officials.
The looting of the public continues, aided by the Obama Administration. (I almost typed Bush. Wow.)
As explained in On the Urgency of Restructuring Bank and Mortgage Debt, and of Abandoning Toxic Asset Purchases:
Indeed, the only way for the toxic asset sale to increase shareholder equity is if the buyer overpays for the asset. To accomplish this, the Geithner plan creates a speculative incentive for private investors, by effectively offering them [...]