I am a new learner of Ruby on Rails. I followed through the railstutorial.org tutorial and I'm trying to learn off the sample demo app where you can to make microposts and only the people who are "following" you can see them. If I wanted to make it so every user can see microposts as an additional functionality, what are the steps to do that?
on 2013-03-02 11:27
on 2013-03-02 14:29
On 2 March 2013 10:27, Shawn Francis <lists@ruby-forum.com> wrote: > I am a new learner of Ruby on Rails. > I followed through the railstutorial.org tutorial and I'm trying to > learn off the sample demo app where you can to make microposts and only > the people who are "following" you can see them. > If I wanted to make it so every user can see microposts as an additional > functionality, what are the steps to do that? Have you worked right through the tutorial? I mean actually worked through it doing the examples. Which bits of the new functionality do you not know how to do? Colin
on 2013-03-04 09:23
> > I am also a new user and I had the same question. The way I did it was to > modify the file app/views/shared/_feed.html.erb changing <%= render partial: 'shared/feed_item', collection: @feed_items %> to <%= render partial: 'shared/feed_item', collection: Micropost.all %> so instead of rendering only the feeds from users you are following(@feed_items), it renders them all.
on 2013-03-04 11:00
On 4 March 2013 06:12, Brentwood Reid <bwoodreid@gmail.com> wrote:
> Micropost.all %>
I assumed that the OP wanted this feature in addition to the existing
capabilities rather than instead of. If however that is what he wants
then it would be better to change the definition of @feed_items in the
controller rather than changing it in the view.
Colin
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.