You're right. I messed up an association . I created the parent from admin
controller and the user_id became admin user_id , no the actual user :)
Any idea why it might crash when i try to have controls in the table plus ?
<show-page>
<content-body:>
<a with="&this.children" action="new" >New Child</a>
<table-plus:children fields="this" >
<controls: />
</table-plus>
</content-body:>
</show-page>
new style url does not match old style url /snippets//edit. obj:
#<Snippet id: nil, name: nil, content: nil, created_at: nil,
updated_at: nil, user_id: 2, style: nil, multisnippet_id: 1,
template_id: nil>. args: ["edit", {"subsite"=>nil}]. backtrace:
["/home/raven/.rvm/gems/ruby-1.9.3-p286@hobo20/gems/hobo_rapid-2.0.0.pre3/taglibs/html/a.dryml:147:in
`block in a'",
"/home/raven/.rvm/gems/ruby-1.9.3-p286@hobo20/gems/dryml-2.0.0.pre3/lib/dryml/template_environment.rb:379:in
`block in _tag_context'",
"/home/raven/.rvm/gems/ruby-1.9.3-p286@hobo20/gems/dryml-2.0.0.pre3/lib/dryml/template_environment.rb:281:in
`block in new_context'",
multisnippet is the parent and snippet is the child
multisnippet has_many snippets
snippet belongs to multisnippet
New link is working perfectly and the parent_id is getting assigned
correctly . but table plus crashes when i add controls
Thanks
Vivek
On Thu, Nov 8, 2012 at 10:21 PM, Bryan Larsen <[email protected]> wrote:
> I'm definitely still missing something. Can you recreate your
> problem on a sample application so I can play around with it to figure
> out exactly what's going on?
>
> It appears that _id_ is nil. parent_id being nil shouldn't be causing
> this type of error. There is really no reference to modelb inside of
> the table-plus...
>
> thanks,
> Bryan
>
>
> On Thu, Nov 8, 2012 at 11:35 AM, Vivek Sampara <[email protected]>
> wrote:
> > Thats right.
> >
> > Its more like parent child relation
> >
> > child has actions :all
> > actions_for :parent , [:index, :create, :new ]
> >
> > So some children are created explicitly without a parent id and some with
> > parent id .
> >
> > Im trying to put a table plus for those which dont have a parent id with
> > controls.
> >
> > Can correct if im doing anything wrong here ?
> >
> > Thanks
> > Vivek
> >
> >
> > On Thu, Nov 8, 2012 at 9:52 PM, Bryan Larsen <[email protected]> wrote:
> >>
> >> It looks like this.MODELAs is returning some models that don't exist
> >> in the database or have a nil id for some other reason.
> >>
> >> You can only have an edit action for items that exist in the database.
> >>
> >> Bryan
> >>
> >>
> >> On Thu, Nov 8, 2012 at 10:53 AM, Vivek Sampara <[email protected]
> >
> >> wrote:
> >> > Hi guys,
> >> >
> >> > Im trying to create a table plus for Model B in Model A
> >> >
> >> > <show-page>
> >> > <content-body:>
> >> > <a with="&this.MODELAs" action="new" >New Snippet</a>
> >> > <table-plus with="&this.MODELAs" fields="content" >
> >> > <controls: />
> >> > </table-plus>
> >> > </content-body:>
> >> > </show-page>
> >> >
> >> > but i get this new style url does not match old style url
> >> > /MODELAs//edit.
> >> >
> >> > I could create a Model A object for Model B but not able to have an
> >> > edit
> >> > action for that particular object .
> >> >
> >> > any idea how to get the controls for Model A objects via Owner actions
> >> > on
> >> > table-plus ?
> >> >
> >> > Thanks
> >> > Vivek
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups
> >> > "Hobo Users" group.
> >> > To view this discussion on the web visit
> >> > https://groups.google.com/d/msg/hobousers/-/0jwC1msA5FMJ.
> >> > 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.
> >>
> >> --
> >> 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.
> >>
> >
> > --
> > 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.
>
> --
> 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.
>
>
--
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.