Skip to content

Instantly share code, notes, and snippets.

View mattmate's full-sized avatar

mattmate

View GitHub Profile
@mattmate
mattmate / gist:1213408
Created September 13, 2011 08:23
Encoding Fix
module ERB::Util
def html_escape(s)
s = s.to_s.force_encoding("utf-8")
if s.html_safe?
s
else
s.gsub(/[&"><]/) { |special| HTML_ESCAPE[special] }.html_safe
end
end
end
@mattmate
mattmate / gist:1205320
Created September 9, 2011 02:05
Menu Gen
Rendered shared/_head.html.erb (7.0ms)
Rendered shared/_menu_branch.html.erb (2.6ms)
Rendered shared/_menu_branch.html.erb (7.7ms)
Rendered shared/_menu_branch.html.erb (17.9ms)
Rendered shared/_menu_branch.html.erb (3.0ms)
Rendered shared/_menu_branch.html.erb (0.3ms)
Rendered shared/_menu_branch.html.erb (9.1ms)
Rendered shared/_menu_branch.html.erb (16.7ms)
Rendered shared/_menu_branch.html.erb (5.4ms)
Rendered shared/_menu_branch.html.erb (2.3ms)
@mattmate
mattmate / gist:709604
Created November 22, 2010 06:26 — forked from parndt/gist:709496
## MAKE SURE YOU BACKUP FIRST
## e.g. using git source control
## This is not for people who don't want to have to do some manual work getting everything working.
## This also is not officially "supported" but we will hopefully be able to write an upgrade task later on based on feedback.
## Notable files that get overriden:
## public/stylesheets/application.css (put yours back afterwards but remove any @import for refinery css)
## public/stylesheets/formatting.css (put yours back afterwards but remove any @import for refinery css)
## public/stylesheets/home.css (put yours back afterwards but remove any @import for refinery css)
@mattmate
mattmate / gist:709603
Created November 22, 2010 06:26 — forked from parndt/gist:709496
## MAKE SURE YOU BACKUP FIRST
## e.g. using git source control
## This is not for people who don't want to have to do some manual work getting everything working.
## This also is not officially "supported" but we will hopefully be able to write an upgrade task later on based on feedback.
## Notable files that get overriden:
## public/stylesheets/application.css (put yours back afterwards but remove any @import for refinery css)
## public/stylesheets/formatting.css (put yours back afterwards but remove any @import for refinery css)
## public/stylesheets/home.css (put yours back afterwards but remove any @import for refinery css)
Started GET "/about-us/accreditations" for 110.174.55.118 at Fri Nov 12 00:15:03 +0000 2010
Processing by PagesController#show as HTML
Parameters: {"path"=>"about-us/accreditations", "locale"=>:en}
Read fragment views/refinery/travel.sydneywebservices.com.au/views/pages/about-us/accreditations (0.1ms)
Rendered shared/_content_page.html.erb (1.2ms)
Rendered /home/travelti/apps/traveltime/shared/bundle/ruby/1.8/gems/refinerycms-0.9.8.5/vendor/refinerycms/core/app/views/shared/_site_bar.html.erb (0.8ms)
Rendered /home/travelti/apps/traveltime/shared/bundle/ruby/1.8/gems/refinerycms-0.9.8.5/vendor/refinerycms/core/app/views/shared/_google_analytics.html.erb (1.1ms)
Rendered /home/travelti/apps/traveltime/shared/bundle/ruby/1.8/gems/refinerycms-0.9.8.5/vendor/refinerycms/core/app/views/shared/_head.html.erb (5.7ms)
Rendered /home/travelti/apps/traveltime/shared/bundle/ruby/1.8/gems/refinerycms-0.9.8.5/vendor/refinerycms/pages/app/views/pages/show.html.erb within layouts/application (12.9ms)
Completed in 25ms
activesupport (3.0.0) lib/active_support/whiny_nil.rb:48:in `method_missing'
refinerycms (0.9.8.5) vendor/refinerycms/core/app/views/shared/_content_page.html.erb:9:in `__usr_local_lib_ruby_gems_____gems_refinerycms_________vendor_refinerycms_core_app_views_shared__content_page_html_erb__958028003_2219937860_2630910'
actionpack (3.0.0) lib/action_view/template.rb:135:in `send'
actionpack (3.0.0) lib/action_view/template.rb:135:in `render'
activesupport (3.0.0) lib/active_support/notifications.rb:54:in `instrument'
actionpack (3.0.0) lib/action_view/template.rb:127:in `render'
actionpack (3.0.0) lib/action_view/render/partials.rb:294:in `render_partial'
actionpack (3.0.0) lib/action_view/render/partials.rb:223:in `render'
activesupport (3.0.0) lib/active_support/notifications.rb:52:in `instrument'
activesupport (3.0.0) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
Showing sites/refinerycms/vendor/refinerycms/images/app/views/admin/images/_grid_view.html.erb where line #4 raised:
undefined local variable or method `log' for #<Dragonfly::Processing::RMagickProcessor:0x1032ab328>
dragonfly (0.7.5) lib/dragonfly/r_magick_utils.rb:23:in `rmagick_image'
dragonfly (0.7.5) lib/dragonfly/processing/r_magick_processor.rb:75:in `resize_and_crop'
dragonfly (0.7.5) lib/dragonfly/processing/r_magick_processor.rb:100:in `thumb'
dragonfly (0.7.5) lib/dragonfly/function_manager.rb:37:in `call'
dragonfly (0.7.5) lib/dragonfly/function_manager.rb:37:in `call_last'
dragonfly (0.7.5) lib/dragonfly/function_manager.rb:36:in `catch'