# Usage: # nil.get :blake # => nil # some_obj.get :name, :length # => The value of some_obj.name.length or nil ...
Ruby Getting at properties witho...
by https://www.google.com/accounts/o8/id?id=AItOawnD4RuRfXrViQ3sf5r-skjxsD4i7zlzCaA,
January 30, 2011 17:41,
4 refactorings, tagged with ruby, helper
def display_title
if @title.blank?
APP_CONFIG[:site][:title]
...
Ruby Page Title Display Helper
I have a helper that append...
def user_photo(user, values = {})
values[:style] ||= ''
values[:class] ||= ''
...
Ruby User thumbnail helper needs...
Bit of a Ruby noob. Could u...
def button(title, values) # title: Accepts a string that will appear on the button # values: accepts the possible optional parameters. ...
Ruby Button code creates a gener...
Probably a more efficient w...
def browser?(b)
user_agents = {
:ff => /Firefox/,
...
Ruby browser detection and url r...
i have a simple browser det...
module DashboardHelper
def activity_message_for(object)
case object.class.name
...
Ruby Dashboard
This works but it's kind of...
Is there a better way to do...