Arrays in Ruby
Ruby syntax for working with arrays (cheat-sheet):
Achieving Developer Excellence with Automated Testing
Posts related to Ruby, Rails, other programming topics. Highly technical.
Ruby syntax for working with arrays (cheat-sheet):
Symbols used in CSS symbol name what for notes . dot (period) denotes class value # pound denotes id value…
def hilite_search_criteria(pattern, search_criteria) return if pattern.nil? or search_criteria.nil? pattern.gsub!(/(]*>)|\n|\t/s) {” “} match_char = pattern =~ /#{search_criteria}/i matched_string = $~.to_s return…
In your views: controller.action_name controller.controller_name In the controller itself, you can just call controller_name action_name If you want the current…
Usually you can trust the .toggle function (or .slideToggle) to hide or show whatever you want it to. But occasionally…
Here’s a jQuery function to make your images slightly opaque (or “disabled” looking), then have them fade in when you…
The relative url root is the thing that is appended to the front of your path, but after the domain…
symbol what it does + concatenate “a” “b” => -1 >> “a” “a” => 0 >> “b” “a” => 1…
1) Use the “system” method system “ls” 2) Or use backticks. Note that backticks support you returning to the results…
Some great shortcuts for script generation. I always try to start by building scaffold for any new entity, then remove…