Delete temporary class files
C:\Documents and Settings\[user]\Local Settings\Application Data\Macromedia\Flash MX 2004\en\Configuration\Classes\aso
12114 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
C:\Documents and Settings\[user]\Local Settings\Application Data\Macromedia\Flash MX 2004\en\Configuration\Classes\aso
class String def rubify downcase.gsub(/\W/, ' ').squeeze.strip.gsub(' ', '_') end def rubify! replace rubify end end
"My, what a beautiful day!".to_id => "my_what_a_beautiful_day"
def flash_div *keys keys.collect { |key| content_tag(:div, flash[key], :class => "flash #{key}") if flash[key] }.join end
<%= flash_div :warning, :notice %>
<div class="flash warning">Warning here</div> <div class="flash notice">Notice here</div>
:notice for positive feedback (action successful, etc) :message for neutral feedback (reminders, etc) :warning for negative feedback (action unsuccessful, error encountered, etc)
FLASH_NAMES = [:notice, :warning, :message] <% for name in FLASH_NAMES %> <% if flash[name] %> <%= "<div id=\"#{name}\">#{flash[name]}</div>" %> <% end %> <% end %>