Code Search for Developers
 
 
  

store_helper.rb from crlove at Krugle


Show store_helper.rb syntax highlighted

module StoreHelper
  def hidden_div_if(condition, attributes = {})
    if condition
      attributes["style"] = "display: none"
    end
    attrs = tag_options(attributes.stringify_keys)
    "<div #{attrs}>"
  end
  
  def format_price(amount)
    dollars, cents = amount.divmod(100)
    sprintf("$%d.%02d", dollars, cents)
  end
end




See more files for this project here

crlove

Online psychological-test-based friend-making system.

Project homepage: http://sourceforge.net/projects/crlove
Programming language(s): Java,JavaScript,Ruby,XML
License: other

  admin_helper.rb
  application_helper.rb
  store_helper.rb