Sha256: 4bc3fee3c47fb444ebf655c63c45d7d38e83359406db93ee43a28cec929eed98

Contents?: true

Size: 431 Bytes

Versions: 7

Compression:

Stored size: 431 Bytes

Contents

class DecoratorWithApplicationHelper < Draper::Decorator
  def uses_hello_world
    h.hello_world
  end

  def sample_content
    h.content_tag :span, "Hello, World!"
  end

  def sample_link
    h.link_to "Hello", "/World"
  end

  def sample_truncate
    h.truncate("Once upon a time", :length => 7)
  end

  def length
    "overridden"
  end

  def sample_html_escaped_text
    h.html_escape '<script>danger</script>'
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
draper-1.0.0 spec/support/decorators/decorator_with_application_helper.rb
draper-1.0.0.beta6 spec/support/decorators/decorator_with_application_helper.rb
draper-1.0.0.beta5 spec/support/decorators/decorator_with_application_helper.rb
draper-1.0.0.beta4 spec/support/decorators/decorator_with_application_helper.rb
draper-1.0.0.beta3 spec/support/decorators/decorator_with_application_helper.rb
draper-1.0.0.beta2 spec/support/decorators/decorator_with_application_helper.rb
draper-1.0.0.beta1 spec/support/decorators/decorator_with_application_helper.rb