Sha256: a6788a10501f49ec477f8f93c7a7030a28c982e37ff712320da5f3c88eab11ca

Contents?: true

Size: 803 Bytes

Versions: 14

Compression:

Stored size: 803 Bytes

Contents

<% module_namespacing do -%>
module <%= class_name %>Frill 
  include Frill

  # Decorating before or after another frill:
  #   after SomeFrill
  # or...
  #   before SomeFrill

  # frill? tells Frill when to decorate an object with this module.
  # If you're decorating within a controller action via the `frill`
  # method, then the context is the controller instance.
  # This would allow you to scope this frill to only certain types
  # of requests (e.g., context.request.json?)
  def self.frill?(object, context)
    false
  end

  # Decorate methods on `object`. 
  # If you want to use a view helper like `link_to` or a route helper like
  # `root_path`, use the `helpers` method (or its short alias, `h`) to access them:
  # def created_at
  #   h.content_tag :b, super
  # end
end
<% end -%>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
frill-0.1.16 lib/generators/frill/templates/frill.rb
frill-0.1.15 lib/generators/frill/templates/frill.rb
frill-0.1.14 lib/generators/frill/templates/frill.rb
frill-0.1.13 lib/generators/frill/templates/frill.rb
frill-0.1.12 lib/generators/frill/templates/frill.rb
frill-0.1.11 lib/generators/frill/templates/frill.rb
frill-0.1.10 lib/generators/frill/templates/frill.rb
frill-0.1.9 lib/generators/frill/templates/frill.rb
frill-0.1.8 lib/generators/frill/templates/frill.rb
frill-0.1.7 lib/generators/frill/templates/frill.rb
frill-0.1.6 lib/generators/frill/templates/frill.rb
frill-0.1.5 lib/generators/frill/templates/frill.rb
frill-0.1.4 lib/generators/frill/templates/frill.rb
frill-0.1.3 lib/generators/frill/templates/frill.rb