Skip to content

Instantly share code, notes, and snippets.

@lcowell
Created January 21, 2013 16:54
Show Gist options
  • Save lcowell/4587410 to your computer and use it in GitHub Desktop.
Save lcowell/4587410 to your computer and use it in GitHub Desktop.
redering tags in rails
require "rubygems"
require 'rails/all'
class MyApp < Rails::Application
config.active_support.deprecation = :log
end
class MyView
include ActionView::Helpers::TagHelper
end
MyApp.initialize!
view = MyView.new
view.tag("img", :src => "horse_apples.jpg") # => "<img src=\"horse_apples.jpg\" />"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment