in my ruby on rails application, i have one controller
class HomeController < ApplicationController
def home
puts “name…#{@name}”
end
def branch //HERE HAVE TO GET THE ABOVE FUNCTION VALUE @name
end
end
What am trying to do, i have to get the @name value in method branch. i
could show the value in function home, but i didn’t get that in function
branch…i have tried this with global variable, class variable…but no
response…? can i use the other pgm language property like the method
overriding. or inheritance…?
What am trying to do, i have to get the @name value in method branch. i
could show the value in function home, but i didn’t get that in function
branch…i have tried this with global variable, class variable…but no
response…? can i use the other pgm language property like the method
overriding. or inheritance…?
That does not make sense, unless you have missed out some of the code.
How is the value @name determined in method home? There seems to be
no code there setting it up.