Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Search In

what is actually module and mixin is

Modules are similar to classes basically every class object is ancestrally a module object.When you create a class you can create instance of that class through which you can execute class's method but this is not possible in modules as it doesn&

Difference between shift(), unshift() and push(),pop() methods

These are few methods which have slight difference. Lets discuss it one by one : Shift() : This method is similar to pop() method, the only difference is that it works at the beginning of the array. It delete the first element from the given array

Ruby: Metaprogramming: Method that makes methods

Ruby: Meta Programming: Method that makes Methods Hi friends, The normal way of defining method is to give the method name after def and write code between def .... end, and it is pretty fine for most of the cases, but sometimes suppose we need som

Rails 4 Strong parameter

Rails 4 has many new features, and Strong parameter is one of them. Strong parameter allows us to choose attributes that can be whitelisted for mass assignment. In rails 3 we were doing this by listing accessible attributes in the model. But in rails

Using Dependent Destroy In Rails

As we know that all the models in our rails application are connected to one another through relations between them. Now these relations can be one to one, many to many, many to one or one to many and etc. Now lets see a scenario where we have an a

Slicing an Array

Basically slice() method is used to extract some particular elements from an original array (suppose i need to show only selected elements from original array). It contain two parameter start/begin and end. begin ->It is the position where to sta

Linear Search in DSA(Data Structure and Algorithms)

Linear search is simple search algorithm in which a sequential searching is done over all the items in a list. Every items are checked and if any match is found then that item is returned otherwise search will be continuued till the end of the dat

How to isolate cookie store for one subdomain from other subdomains and domain itself in Rails 5?

Hello, I need to have cookie store #1 on a.example.com and I need to have cookie store #2 on b.example.com and on example.com One method was to change cookie name per subdomain / domain, however  request.env['rack.session.options'][:key] =

Use of Migration in Rails

Rails Migrations can be used to alter the database.Migration allows ruby to define the changes in database schema in a consistent and easy way. So If one deleloper make some changes in database schema, the other developers just need to update, and ru

Overriding Equality of objects

Overriding Equality of objects In ruby the equality of the objects depend upon several things, which are a) == b) hash c) eql? In normal cases whenever you run == method for string numbers etc it works perfectly fine, but if there are two identic

1 3 140
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: