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
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
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'
3 matches
Mail list logo