Wednesday, May 06
Permalink

Rails and nested has_many :through

posted 2 years ago

Rails does not support nested has_many :though => associations. There is a plugin however which enables this, and JackDangers branch on github has patches for Rails 2.3.2.

script/plugin install git://github.com/JackDanger/nested_has_many_through.git

Which enables you to do the something like the following:



class User < ActiveRecord::Base

 has_many :accounts

 has_many :memberships,  :though => :accounts

 has_many :groups, :through => :memberships 

end
Comments (View)
Saturday, April 18
Permalink
Comments (View)
Friday, April 17
Permalink
Comments (View)
Sunday, April 05
Saturday, April 04
Permalink
Comments (View)
Friday, April 03
Tuesday, March 31
Monday, March 30
Permalink

Flash messages hanging around?

posted 2 years ago

If you are making use of the Rails flash helper to display messages, what do you do when they are not clearing after rendering a page? You need to use Flash.now see the following gist for an example.

Comments (View)
Sunday, March 29
Saturday, March 28
Permalink

Yet another twitter app idea

posted 2 years ago

Planning on checking out tweetapp at some point to build a nifty twitter application on Google App Engine. This should give me a chance to brush off the cobwebs off my python book, although I will praise the day they allow us to use Ruby.

Comments (View)