Assign a variable a value if it's nil
Category: Other - Tools & Utilities
There is a nifty way to give a variable a value if it's nil Date: 13 March, 2012
Variable Value - Ruby Snippets - Ruby Value - Variable - Value - Ruby
Homepage: http://snippets.dzone.com
Developer: snippets.dzone.com
License: Freeware
Operating System: Windows
all are required fields
Related Scripts Download
Split an array of elements into a set of smaller arrays of equal size.
Developer: snippets.dzone.com
License: Freeware
Operating System: All
Split a string into an array of roughly equal sized chunks based on a string or regular expression delimiter.
Developer: snippets.dzone.com
License: Freeware
Operating System: All
Get the currently running method name in Ruby - how to get the running methos name in ruby.
Developer: snippets.dzone.com
License: Freeware
Operating System: All
Float Hacks:to_s override.
Developer: snippets.dzone.com
License: Freeware
Operating System: All
A replacement for Ruby's File.
Developer: snippets.dzone.com
License: Freeware
Operating System: All
The following code will create a live search in your Ruby on Rails project using AJAX.
Developer: snippets.dzone.com
License: Freeware
Operating System: All
Clone dev DB schema to test DB in Rails.
Developer: snipplr.com
License: Freeware
Operating System: All
To create an indexed view of either all of the items (in a normal index view), or filtered based on an association, you can do the following.
Developer: snippets.dzone.com
License: Freeware
Operating System: Windows, Linux
One-liner to list, in sort order, an obect's methods.
Developer: snippets.dzone.com
License: Freeware
Operating System: Windows, Linux