Sha256: 2400262a561123190dc0e8ae710957ad7c61f30d4b3393b0d779c5655a7eb0d5

Contents?: true

Size: 481 Bytes

Versions: 43

Compression:

Stored size: 481 Bytes

Contents

ActionController::Base.class_eval do

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

  attr_accessor :dryml_fallback_tag

  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

43 entries across 43 versions & 1 rubygems

Version Path
dryml-2.2.6 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.2.5 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.2.4 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.2.3 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.2.2 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.2.1 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.2.0 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.1.2 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.1.1 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.1.0 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.1.0.pre4 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.1.0.pre3 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.1.0.pre2 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.1.0.pre1 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.0.1 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.0.0 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.0.0.pre10 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.0.0.pre9 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-2.0.0.pre8 lib/dryml/extensions/action_controller/dryml_methods.rb
dryml-1.3.3 lib/dryml/extensions/action_controller/dryml_methods.rb