Jump to content

The ultimate community for Ruby on Rails developers.


Photo

RoR items are not rendered in view by :id because they are not listed in order of :id in rails_admin?

rails damin rendering postgres

  • Please log in to reply
No replies to this topic

#1 folubode

folubode

    Signalman

  • Members
  • 17 posts

Posted 11 November 2016 - 08:30 PM

Help please, I have these items in database and when rendered in rails view, they are not listed in order of the :id which I expect. When I looked in the rails_admin dashboard, they are also not in order. In fact they are render in the order that they are listed in the rails_admin. I have used .order in the models but not working. This issue just started with addition of new data as in I have not had this issue before even when I did not use .order in the controller. 

What am I missing please?

I have:

Topic has_many :entities

Entity belong_to :topic

in the models

 

In the rails_admin dashboard:

Entities Entity #397, Entity #396, Entity #395, Entity #394, Entity #398, Entity #399, Entity #400, Entity #401, Entity #402, Entity #403, Entity #404, Entity #405, Entity #406, and Entity #407

In the view, when it renders on the webpage: Entity #397, Entity #396, Entity #395, Entity #394, Entity #398, Entity #399, Entity #400, Entity #401, Entity #402, Entity #403, Entity #404, Entity #405, Entity #406, and Entity #407







Also tagged with one or more of these keywords: rails damin, rendering, postgres

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users