top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Class static variables in Ruby on Rails?

+1 vote
107 views

When setting the class static variables, These are shared across all the instances created.

Class A
 @@bool_var = true

 def get_bool_var
 @@bool_var
 end
end

All the instances will have this static variable, When through a controller, a user requests, Based on some logic, I set the value to false.

Is this class static variable be set to false in all the other requests from other users on a web application ?

posted May 26, 2014 by Dewang Chaudhary

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

Similar Questions
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...