Sha256: 69cafe8669750b1d421a55ac68c7f5b208dbfe62b007b4eb09a06b33dc35ce59

Contents?: true

Size: 554 Bytes

Versions: 17

Compression:

Stored size: 554 Bytes

Contents

ActionController::Base.class_eval do

  before_filter do
    append_view_path Dryml::Railtie::PageTagResolver.new(self)
  end

  attr_accessor :dryml_fallback_tag

  # dryml does not use layouts
  def action_has_layout?
    false
  end

  def dryml_context
    @this
  end

  def call_dryml_tag(tag, options={})
    # TODO: Figure out what this bit is all about :-)
    if options[:with]
      @this = options[:with] unless options[:field]
    else
      options[:with] = dryml_context
    end
    Dryml.render_tag(view_context, tag, options)
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
dryml-1.3.0.pre29 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre28 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre27 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre26 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre25 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre24 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre23 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre22 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre21 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre20 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre19 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre18 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre16 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre15 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre14 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre13 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.0.pre12 lib/dryml/extensions/action_controller/dryml_methods.rb