I want to use several custom classes in the controller. Some of them are supposed to have certain associations. I know how to work with associations in the model and I thought that I could do something similar here. What I tried is something like this: module Types class System < ActiveRecord::Base has_many :resources attr_accessor :name def initialize(name) @name = name end end class Resource < ActiveRecord::Base belongs_to :system attr_accessor :name def initialize(name,system) @name = name # add to system (?) end end end So how can I specity the System for a Resource or return it? Thanks, Max --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---