Sha256: 0f07f94daf5f56ada5905a8d57d846d2ddfe42840c42d50e0b53494c7fcd73bc

Contents?: true

Size: 333 Bytes

Versions: 8

Compression:

Stored size: 333 Bytes

Contents

require 'erb'

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
innate-2012.03 lib/innate/view/erb.rb
innate-2011.12 lib/innate/view/erb.rb
innate-2011.10 lib/innate/view/erb.rb
innate-2011.04 lib/innate/view/erb.rb
innate-2011.01 lib/innate/view/erb.rb
innate-2010.07 lib/innate/view/erb.rb
innate-2010.06.18 lib/innate/view/erb.rb
innate-2010.04 lib/innate/view/erb.rb