On Fri, Feb 27, 2009 at 1:20 PM, Tony Tony rails-mailing-l...@andreas-s.net
wrote:
Hi all,
I'm ashamed to ask this but I can't figure it out. Lately my brain gets
more burned out by the minute. Basically I'm trying to have a shirt have
up to 2 colors. I currently have this working. When I
Ideally something like this would be great:
%=h @shirt.approved_colors.color_id.name %
Any ideas? I don't know why my brain is shot today. Hate it.
-Tony
--
Posted via http://www.ruby-forum.com/.
--~--~-~--~~~---~--~~
You received this message because you
On Feb 27, 2009, at 1:20 PM, Tony Tony wrote:
Hi all,
I'm ashamed to ask this but I can't figure it out. Lately my brain
gets
more burned out by the minute. Basically I'm trying to have a shirt
have
up to 2 colors. I currently have this working. When I edit a shirt, I
can select the
Thanks for the replies!
Craigs solution worked like a charm.
First time I use foreign_key. I have a feeling that while this worked,
the way it works (specifically having to specify foreign_key) is
incorrect or rather defaults rails conventions. Is this the case? If so
what can or should I
On Fri, Feb 27, 2009 at 2:33 PM, Tony Tony rails-mailing-l...@andreas-s.net
wrote:
Thanks for the replies!
Craigs solution worked like a charm.
Cool.
First time I use foreign_key. I have a feeling that while this worked,
the way it works (specifically having to specify foreign_key) is
Craig Demyanovich wrote:
Using the :foreign_key option isn't incorrect. It's there if you need to
circumvent the Rails defaults for any reason. If you didn't want to use
the
:foreign_key option, you could use a migration to rename the color_id
and
color2_id columns in your shirts table to
6 matches
Mail list logo