hjq-input-many seems to do the trick..!

THANKS..! :D

On 8 Dec., 01:49, Bryan Larsen <[email protected]> wrote:
> What tags are you using?
>
> It sounds like you're using a select-many in one case and an input-many
> in the other case.
>
> In your input-many case, it sounds like you may be running into the "at
> least one record" limitation.   hjq-input-many in the hobo-jquery plugin
> doesn't have this limitation.  It's on our plate
> (https://hobo.lighthouseapp.com/projects/8324/tickets/542) to enhance
> the standard input-many tag with some of the functionality of
> hjq-input-many, but in the meantime, you can use hjq-input-many instead
> of the stock input-many.
>
> Bryan
>
>
>
> Mikkel WF wrote:
> > I have i question about automatic form generation when using rich many-
> > to-many joins in Hobo.
>
> > Firstly, i have 2 models:
>
> > class Associate
> >   fields do
> >     name  :string
> >     email :string
> >     timestamps
> >   end
> >   has_many :portfolio_associates, :dependent => :destroy
> >   has_many :portfolios, :through => :portfolio_associates
>
> > class Portfolio < ActiveRecord::Base
> >   fields do
> >     name        :string
> >     description :text
> >     started_at  :date
> >     ended_at    :date
> >     timestamps
> >   end
> >   has_many :portfolio_associates, :dependent => :destroy
> >   has_many :associates, :through => :portfolio_associates
>
> > And a binding model:
>
> > class PortfolioAssociate < ActiveRecord::Base
> >   fields do
> >     role enum_string(:student, :supervisor, :external_contact)
> >     timestamps
> >   end
> >   belongs_to :associate
> >   belongs_to :portfolio
>
> > When i create i new portfolio, i would like to be able to associate
> > associates to the portfolio, and give these associates different
> > roles. I kind of works, but not 100% percent. Here are the glitches:
>
> > - When i make the :associates accessible to the portfolio, i can
> > create a new portfolio without problem, and add and delete all
> > associated associates without any problem, BUT i cannot set the role
> > of the portfolio association.
> > - When i make the :portfolio_associates accessible to the portfolio, i
> > can set the role, but i HAVE to assign at least one association for
> > the portfolio entry to be saved correctly, otherwise the one
> > portfolio_association in the create form doe's not have a associate
> > selected, and that breaks the join.
>
> > Ny question is how can i secure that i can both create a portfolio
> > WITHOUT any association AND make is possible to assign roles to the
> > associations?
>
> > --
>
> > 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