How to use two databases to a single application?
Latest Answer: This is for Ruby on Rails.1. Set the database at config/database.yml. ex mydb: adapter: mysql database: mydb socket: /tmp/mysql.sock username: login password: password2. ...
Latest Answer: Class variable's are preceeded by @@ symbols. ...
Latest Answer: It is a method that alters the attribute of an object.myabcs = ['a', 'b', 'c']#myabcs is of type Array.myabcs.reverse!# this method altered the object.p myabcs#outputs:#["c", "b", "a"]For this to work ...
Latest Answer: A method that loads and processes the Ruby code from a separate file, including whatever classes, modules, methods, and constants are in that file into the current scope. load is similar, but rather than performing the inclusion operation once, it reprocesses ...
Latest Answer: A Global variable ($a) has a full scope in application. We can use any where in the application as you want. ...
Latest Answer: In Ruby nil is an Object for NilClass, You can directly check as nil.class it will return NilClass.Where as false is an object for FalseClass. ...
Latest Answer: By applying the access modifier : Public , Private and Protected acces Modifier ...
Latest Answer: Use the super keyword to call the superclass implementation of the current method. ...
View page [1] 2 3 Next >>

Go Top