Please help me!

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
@categories = Category.salable_items
@products_id = Product.find(params[:id])
@products = Product.salable_items1(params[:id])
flash[:notice] = “Succesfully”


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

def self.salable_items1(rid)
:conditions => “cat_id = rid”,
:order => “date_available desc”)

I am unable to access the variblein find method rid

How can access that variable…

Thnaks and regards,


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs