hi,
This might be really obvious to someone, but this is doing my head in,
however I am a noob so any help would be appreciated.
this is my routes.rb file:
map.resources :comments
map.resources :posts
map.connect :logs
I have two controllers, one is called Posts (which I generated using a
scaffold) and the other is called logs-- I just created a controller for
this.
logs controller:
def index
@logs = (Post.all)
end
def show
@log = Post.find(params[:id])
end
Now my problem is this:
index.html in logs folder:
<%= link_to 'read more...', log%>
I want this to link to link to log/:id (e.g. logs/1) when they click on
the first post, however it keeps going to posts/:id (e.g. posts/1)
Sorry about the long question, I’m trying to give as much information as
possible, any help would be appreciated.
Cheers