toby hede
unread,Jul 17, 2008, 6:05:48 AM7/17/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Streamlined
Hi,
I've been using Streamlined and *loving* it.
One thing I have struggled with is getting Relationships to work where
I am using the ability of ActiveRecord to map a column to a different
class.
Contractor:
belongs_to :job_size_minimum, :class_name =>
"ProjectSize", :foreign_key => "job_size_minimum"
belongs_to :job_size_maximum, :class_name =>
"ProjectSize", :foreign_key => "job_size_maximum"
ContractorUI (in controller)
:job_size_minimum, {:enumeration =>
Contractor::PROJECT_SIZES_HASH.sort {|a,b|
a[1]<=>b[1]}, :unassigned_value => "" },
:job_size_maximum, {:enumeration =>
Contractor::PROJECT_SIZES_HASH.sort {|a,b|
a[1]<=>b[1]}, :unassigned_value => "" },
I managed to do some hacketry with enumerations and
before_streamlined_ filters to map the value to the associated Model,
but it's not pretty.
Basically, is there something I am missing?
I am happy to patch, any pointers on what I would need to do for this?