On 3 December 2015 at 15:58, Sai Ch wrote:
> 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
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 ha
On 26 November 2015 at 05:23, Sai Ch wrote:
> Hi,
>
> I need to access one variable in entire controller i.e it is accessible
> to all actions in controller.
>
> I had tried with session and class variable but for example
>
> def create
>document_id = get_document
>@@document_id = sessio
Hi,
I need to access one variable in entire controller i.e it is accessible
to all actions in controller.
I had tried with session and class variable but for example
def create
document_id = get_document
@@document_id = session[:document_id] = document_id
end
def validate
if docume
4 matches
Mail list logo