Sha256: 13c02e9e0039b9c7e5f24ca83c5893f0164daaa5f8a0f65e467ce9225ac5c28c

Contents?: true

Size: 322 Bytes

Versions: 11

Compression:

Stored size: 322 Bytes

Contents

require 'erb'

module Innate
  module View
    module ERB
      def self.call(action, string)
        erb = View.compile(string){|s| ::ERB.new(s, nil, '%<>') }
        erb.filename = (action.view || action.method).to_s
        html = erb.result(action.binding)
        return html, 'text/html'
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
manveru-innate-2009.05 lib/innate/view/erb.rb
manveru-innate-2009.06.12 lib/innate/view/erb.rb
manveru-innate-2009.06 lib/innate/view/erb.rb
manveru-innate-2009.07 lib/innate/view/erb.rb
rjspotter-innate-2009.06.29 lib/innate/view/erb.rb
rjspotter-innate-2009.06.30 lib/innate/view/erb.rb
rjspotter-innate-2009.06.31 lib/innate/view/erb.rb
innate-2009.07 lib/innate/view/erb.rb
innate-2009.05 lib/innate/view/erb.rb
innate-2009.06.12 lib/innate/view/erb.rb
innate-2009.06 lib/innate/view/erb.rb