Re: [Rails] template not rendering (unable to retrieve data)

2010-12-01 Thread Colin Law
On 1 December 2010 07:32, kiran 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.dra

Re: [Rails] template not rendering (unable to retrieve data)

2010-11-30 Thread rajeevsharma86
are you able to see add by id and please paste here you log file output or error in deatils On Wed, Dec 1, 2010 at 1:02 PM, kiran wrote: > Controller:ads_controller.rb > > class AdsController < ApplicationController > > def index > @ads = Ad.find(:all) > end > > def show > @ad=Ad.find(params[:id

[Rails] template not rendering (unable to retrieve data)

2010-11-30 Thread kiran
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'