Hi,

I would like to know variable scope for variable accessibility in all
rails controller methods.

for example, I had done like below.

class app_controller

def set_vaule
@var = "12gfjdl"
end

def actions1
  need display @var here
end

def action2
 here also need @var value
end

end

note: I had tried with session and declare @var as class variable(@@var)
it access only first time, later if I made any request again the action
is  set to nil i.e
uninitialised class variable.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/af68e5540e63813206cf4fc4cce3a5bf%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to