Pattern Matching Function (Ruby)
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…
Achieving Developer Excellence with Automated Testing
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…
I have defined a click function in the document ready $(“#submit_request_toggle”).click(function() { $(‘#submit_request’).slideToggle(500); }); Later, I do an ajax call…