On 9/16/05, Daniel Allen <[EMAIL PROTECTED]> wrote: > I'm working through the maypole documentation I'm hoping there's a > simple answer to the following question. > > http://maypole.perl.org/?ManualBeer ends with the following: > > --- > "Maypole can't tell easily that a BeerDB::Beer object can call pubs to > get a list of pubs. Not yet, at least; we're working on it. In the > interim, we can explicitly tell Maypole which accessors are related to > the BeerDB::Beer class like so: > > sub related { "pubs" } > > Now when we view a beer, we'll have a list of the pubs that it's on at." > --- > > Is there a way to modify the beer/pubs associations, without directly > exposing the handpumps table? > > When I was looking through the old archives, I did find an early 2004 note > from > Simon Cozens saying he had hoped there could be a "multiple-select" > dropdown, to be used while editing beers for adding multiple pubs, but > I haven't found anything on that sort of control after that post. > > Apologies if I'm missing something obvious.
I think the docs are out of date. The related() method should work fine for has_many relationships. Although it's probably broken for has_a, unless you get the latest from svn. However I don't think the factory templates will build you a multiple select, you have to do that yourself. I might be wrong because I haven't used the standard Maypole templates for a while. <plug> Or you could look at Maypole::FormBuilder, which does build the multi-select. </plug> d. ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Maypole-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maypole-users
