Please quote the previous message when replying. This is a mailling
list not a forum, though you may be accessing it via a forum like
interface, so it is important to quote so we know what you are
replying to. See further comments below.
On 8 March 2016 at 01:03, Hitesh Sancheti <
li...@ruby-forum.com> wrote:
> This is what I see when I click on Show Posts link
>
> 2016-03-08T01:02:38.242828+00:00 heroku[router]: at=info method=GET
> path="/posts" host=
damp-dusk-43146.herokuapp.com
> request_id=b362a590-741a-4b32-8ba6-ad2c8d916413 fwd="67.244.90.19"
> dyno=web.1 connect=0ms service=21ms status=200 bytes=2749
> 2016-03-08T01:02:38.227479+00:00 app[web.1]: Started GET "/posts" for
> 67.244.90.19 at 2016-03-08 01:02:38 +0000
> 2016-03-08T01:02:38.232514+00:00 app[web.1]: Processing by
> PostsController#index as HTML
> 2016-03-08T01:02:38.236506+00:00 app[web.1]: Rendered
> posts/index.html.erb within layouts/application (2.1ms)
That tells us that the server is running GET /posts and is rendering
PostsController#index. That does not sound like the Home Page that
you said it was rendering. Which controller action did you want it to
run?
Unfortunately you have not provided the other information I asked for,
which was to show us a few lines round the Show Posts link in your
code. Please provide that, unless posts#index is the action you want
it to run.
Also have a look at the html that the code is generating (View Page
source in the browser, or something similar depending on which browser
you are using). Copy/paste the relevant section here. But again,
please look at it and see if it helps you to work out what the problem
is. Again if posts#index is the action you want it to run then no
need as that bit is working.
> 2016-03-08T01:02:38.240308+00:00 app[web.1]: Rendered
> posts/_navigation.html.erb (1.1ms)
> 2016-03-08T01:02:38.240592+00:00 app[web.1]: Completed 200 OK in 8ms
> (Views: 7.1ms | ActiveRecord: 0.0ms)
That bit looks a bit odd as it only seems to have rendered what I
assume is your nav bar. Perhaps this is the issue. If posts#index is
the action you expected to be called but it is not rendering the view
you expect then have a look at that code and see if you can see the
issue. Otherwise paste the index action code here.
But don't just post lots of stuff. Try and understand it first and
any bits you don't understand then ask us for help.
Colin