KEEP IN TOUCH

Join Newsletter

CALL NOW

Share with:


Recent Posts





Jason Fleetwood-Boldt

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 if match_char.nil? start = match_char - 25 start = (start < 0 ? 0 : start) unless match_char.nil? p = pattern[start ...

Read More

Here's a jQuery function to make your images slightly opaque (or "disabled" looking), then have them fade in when you rollover them. Just class your <img> tags with imgfade, like this: <img src="someimage.jpg" class="imgfade"> And put this in <head> declaration: <script language="javascript"> $(document).ready(function(){ $(".imgfade").fadeTo(1, 0.55); ...

Read More

The relative url root is the thing that is appended to the front of your path, but after the domain name, that typically is the unique name of your application. This is often used when you're running more than one app on the same domain. http://www.somedomain.com/BlogApp http://www.somedomain.com/EcommerceApp Rails.configuration.action_controller[:relative_url_root] ...

Read More

symbolwhat it does +concatenate "a" "b" => -1 >> "a" "a" => 0 >> "b" "a" => 1 Some more string methods, using examples: >> s = "hello" => "hello" >> s.concat(" world") => "hello world" # .concat is same as + >> s.insert(5, " there") => "hello there world" # inserts substring into part of the...

Read More

Some great shortcuts for script generation. I always try to start by building scaffold for any new entity, then remove the scaffold as needed, leaving only the pieces of the scaffold which I need. to generate a new model: script/generate scaffold Person age:integer first:string last:string some_list_id:integer * This...

Read More