yes colin u r right...thank u...i am surprized to see it worked...a
simple slash made all the difference how would u figure out
this...anyway thanx..

On Dec 1, 2:43 pm, Colin Law <clan...@googlemail.com> wrote:
> On 1 December 2010 07:32, kiran <venkatareddy...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > Controller:ads_controller.rb
>
> > class AdsController < ApplicationController
>
> > def index
> > @ads = Ad.find(:all)
> > end
>
> > def show
> > @ad=Ad.find(params[:id])
> > (params[:id])
> >  end
>
> > end
>
> > routeing: route.rb
>
> > ActionController::Routing::Routes.draw do |map|
> >   map.connect '/ads/', :controller=>'ads', :action=>'index'
> >   map.connect '/ads/:id', :controller=>'ads', :action=>'show'
> > end
>
> > action;index.html.erb
> > <html>
> > <head>
> > <title>All Ads!!<title>
>
> That should be </title> at the end
>
> Colin
>
>
>
>
>
>
>
> > </head>
> > <body>
> > <h1>All Ads!</h1>
> > <ul>
> > <% for ad in @ads %>
> > <li><a href="/ads/<%=ad.id %>"><%=ad.name %> </a></li>
> > <% end %>
> > </ul>
> > </body>
> > </html>
>
> > any one know mebay application on head first rails...i am practicing
> > that one.
> > this application is all about displaying the list of adds to the
> > users.
> > see the above code to display the available ads on an index page ..
> > but the list of names of ads not displaying when i run this
> > application
> > at "http://localhost:3000/ads"; whats wrong ...can anybody help me
> > pls...
>
> > --
> > 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 rubyonrails-t...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > rubyonrails-talk+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
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 rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to