Am I right in assuming there is a performance consideration here...

Won't restricting the values in the model's belongs_to be more
efficient than in the view?


On Dec 8, 3:02 pm, Bryan Larsen <[email protected]> wrote:
> This is the right place.   Matt & Kevin must be busy, we haven't heard
> from them for a while.  They're probably our two most dependable
> question answerers.
>
> There are a couple of options for you.
>
> 1) set the options attribute on your select-one
> (http://cookbook.hobocentral.net/api_tag_defs/select-one).   You'll
> probably have to read the first part of the DRYML guide first to
> understand your many options on you to customize the field.   If you
> get stuck, yell again.
>
> 2) use the :conditions option on your belong_to.   This is probably
> the easier option, but it might require learning a little about SQL
> and/or Rails.   In other words, what I'm saying is that learning how
> to do #1 will probably do you more good going forward.
>
> cheers,
> Bryan
>
>
>
>
>
>
>
> On Thu, Dec 8, 2011 at 9:05 AM, Drammy <[email protected]> wrote:
> > Am I asking this question in the wrong place?  Should I be asking this
> > in the hobo cookbook?
>
> > Any help appreciated.  even if its RTFM at page...
>
> > On Dec 5, 12:35 pm, Drammy <[email protected]> wrote:
> >> Hi all,
>
> >> Still pretty new to all this so apologies if this is straight forward;
> >> I have searched for solutions as it seems quite an easy problem to
> >> solve but alas, no joy.
>
> >> I have a few models like so...
>
> >> Classification -> ClassificationValue...  (where Classification
> >> has_many ClassificationValues and ClassificationValue belongs_to
> >> Classification)
> >> RecognitionType -> Recognition... (where RecognitionType has_many
> >> Recognitions and Recognition belongs_to RecognitionType)
>
> >> Fairly straight forward...  There is also another couple of
> >> relationships...
>
> >> Classification -> RecognitionType  (where RecognitionType belongs_to a
> >> Classification)
>
> >> ClassificationValue -> Recognition  (where Recognition belongs_to a
> >> ClassificationValue)
>
> >> It is the ClassificationValue dropdown box that appears on the
> >> Recognition edit page that is causing me grief.
>
> >> I want this dropdown box to only have valid values (not all
> >> ClassificationValues).  By valid values I mean CalssificationValues
> >> that belong_to the Classification that belongs_to the Recognition's
> >> RecognitionType...
>
> >> Any ideas? (hope you followed that!)
>
> >> Cheers,
> >> Drammy
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Hobo Users" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to 
> > [email protected].
> > For more options, visit this group 
> > athttp://groups.google.com/group/hobousers?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to