Forum: Ruby on Rails Please help me !

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
sure (Guest)
on 2006-04-20 18:52
Hi To This Group!

I am new to ROR I  have some problem in varible acessing in the rb file.

I worte the def  in the strored controller .rb

def products_cat
   $rid=params[:id]
    @categories = Category.salable_items
    @products_id = Product.find(params[:id])
 @products = Product.salable_items1(params[:id])
      flash[:notice] = "Succesfully"


 end

I want to acess the varible that is  in nthe product.rb file that is
model

def self.salable_items1(rid)
find(:all,
:conditions => "cat_id = rid",
:order => "date_available desc")
end

I  am unable to access the variblein find method  rid

How can access that variable..

Thnaks and regards,

Sure
This topic is locked and can not be replied to.