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:
<p><%= link_to 'read more...', log%></p>
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
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---