# Arrayize! convert any non-array object to an array. Leave any existing array alone.
def arrayize(object)
return [object] unless object.is_a?(Array)
object
end
def arrayize2(object)
Array.new(1) { object }.flatten
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function() { | |
| $(document).ready(function() { | |
| return $("div.control-group").focusout(function() { | |
| if (!$("div.control-group").hasClass("error")) { | |
| return $(this).addClass("success"); | |
| } | |
| }); | |
| }); | |
| }).call(this); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ```ruby | |
| # Arrayize! convert any non-array object to an array. Leave any existing array alone. | |
| def arrayize(object) | |
| return [object] unless object.is_a?(Array) | |
| object | |
| end | |
| def arrayize2(object) | |
| Array.new(1) { object }.flatten | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| There was an old lady called Wright | |
| who could travel much faster than light. | |
| She departed one day | |
| in a relative way | |
| and returned on the previous night. |
El Capitan OSX 10.11 Development setup fixes
- Uninstall all rbenv gems
- Install Xcode and command line tools
xcode-select --install - reinstall openssl???
brew reinstall openssl - Config bundler to use brew installed openssl -
bundle config build.eventmachine --with-cppflags=-I$(brew --prefix openssl)/include - Reinstall bundler
gem install bundler - reinstall all gems
bundle install