search for: modelinst

Displaying 2 results from an estimated 2 matches for "modelinst".

Did you mean: modelist
2006 Sep 09
1
Acts as tree and list?
...acts as list together? My model looks like class ModelName < ActiveRecord::Base acts_as_tree :order => "position" acts_as_list :scope => :parent end the table has fields position, :integer parent_id, :integer This kinda of seems to work. Except if I do something like @modelinstance.children.first.move_lower #parent_id = 0 But now @modelinstance.children.first.position = 1 # which is correct now, it used to be 0 @modelinstance.children.second.position = 1 # bad, can''t have to things with same position Any tips for the right way to do this? Thanks --~--~----...
2006 Aug 02
6
Legacy association without primary key
I have a legacy database with which I need to interface. There are two tables that are joined together by two fields, and neither field is the primary key of its associated table. Is constructing an association between these tables beyond the capability of Rails? -- Posted via http://www.ruby-forum.com/.