feepbot has quit [Ping timeout: 264 seconds]
feepbot has joined #amber
feepbot has quit [Ping timeout: 264 seconds]
feepbot has joined #amber
<
FromGitter>
<kolyaio> :-)
<
FromGitter>
<kolyaio> How can I decide the order of posts ?
<
FromGitter>
<Blacksmoke16> like on a blog?
<
FromGitter>
<Blacksmoke16> prob order by date created in db
hightower4 has joined #amber
<
FromGitter>
<kolyaio> @Blacksmoke16 is there a function to do it in amber ? Or crystal ?
<
FromGitter>
<Blacksmoke16> how are you getting your posts atm?
<
FromGitter>
<Blacksmoke16> using granite? like `Post.all`?
<
FromGitter>
<kolyaio> in my view i have a loop running though the posts
<
FromGitter>
<kolyaio> yeah `Post.all` in my constroller
<
FromGitter>
<kolyaio> controller
<
FromGitter>
<kolyaio> I think i found it `posts = Post.all("ORDER BY created_at DESC”)` in the docs by mistake :O
<
FromGitter>
<Blacksmoke16> yea
<
FromGitter>
<Blacksmoke16> :p
<
FromGitter>
<kolyaio> Thanks !! :-)