On 24 November 2015 at 15:17, fugee ohu <fugee279@gmail.com> wrote:
> right, no Parent model ... same thing
So what exactly are you trying to do?
You said you wanted to show all categories on a page so what is wrong with
Category.all.each do |category|
# show category.whatever data
end
Did you seem my PostScript on the previous post?
Colin
>
> On Tuesday, November 24, 2015 at 10:01:46 AM UTC-5, Colin Law wrote:
>>
>> On 24 November 2015 at 14:32, fugee ohu <fuge...@gmail.com> wrote:
>> > Where did the Parent object come from?
>>
>> You mentioned that Category has a parent_id field, I deduced from this
>> that you have Parent has_many categories and Category belongs_to
>> parent. If you don't understand what I am talking about then do the
>> tutorial.
>>
>> If you don't have Parent objects then please explain what you are trying
>> to do.
>>
>> Colin
>> P.S.
>>
>> A: Because we read from top to bottom, left to right.
>> Q: Why should I start my reply below the quoted text?
>>
>> A: Because it messes up the order in which people normally read text.
>> Q: Why is top-posting such a bad thing?
>>
>> A: The lost context.
>> Q: What makes top-posted replies harder to read than bottom-posted?
>>
>> A: Yes.
>> Q: Should I trim down the quoted part of an email to which I'm
>> replying?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/3056102d-d3e7-4fd3-870c-026511bd1874%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLs6wxh-q%2BANzw0A2d0Rvh5n5GZ1U5-PEb5RH9XwqandkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment