-
Add support for arbitrary component attributes. If the presenter method accepts arbitrary keyword arguments, the corresponding component is allowed to pass any attribute it wants.
Jeremy Rodi
-
Add support for testing presenters with RSpec:
require 'curly/rspec' # spec/presenters/posts/show_presenter_spec.rb describe Posts::ShowPresenter, type: :presenter do describe "#body" do it "renders the post's body as Markdown" do assign(:post, double(:post, body: "**hello!**")) expect(presenter.body).to eq "<strong>hello!</strong>" end end end
Daniel Schierbeck
-
Allow passing a block as the
default:
option topresents
.class CommentPresenter < Curly::Presenter presents :comment presents(:author) { @comment.author } end
Steven Davidovitz & Jeremy Rodi
-
Add an
exposes_helper
class methods to Curly::Presenter. This allows exposing helper methods as components.Jeremy Rodi
-
Add a shorthand syntax for using components within a context. This allows you to write
{{author:name}}
rather than{{@author}}{{name}}{{/author}}
.Daniel Schierbeck
-
Fix an issue that caused presenter parameters to get mixed up.
Cristian Planas
-
Clean up the testing code.
Daniel Schierbeck
-
Fix an issue with nested context blocks.
Daniel Schierbeck
-
Make
respond_to_missing?
work with presenter objects.Jeremy Rodi
-
Add support for Rails 4.2.
Łukasz Niemier
-
Allow spaces within components.
Łukasz Niemier
-
Allow configuring arbitrary cache options.
Daniel Schierbeck
-
Fix a bug where a parent presenter's parameters were not being passed to the child presenter when using context blocks.
Daniel Schierbeck
-
Add support for context blocks.
Daniel Schierbeck
-
Forward the parent presenter's parameters to the nested presenter when rendering collection blocks.
Daniel Schierbeck
-
Fixed an issue when using Curly with Rails 4.1.
Daniel Schierbeck
-
Add line number information to syntax errors.
Jeremy Rodi
-
Rename Curly::CompilationError to Curly::PresenterNotFound.
Daniel Schierbeck
-
Add support for collection blocks.
Daniel Schierbeck
-
Add support for keyword parameters to references.
Alisson Cavalcante Agiani, Jeremy Rodi, and Daniel Schierbeck
-
Remove memory leak that could cause unbounded memory growth.
Daniel Schierbeck
-
Add support for conditional blocks:
{{#admin?}} Hello! {{/admin?}}
Jeremy Rodi
-
Allow Curly to output Curly syntax by using the
{{{ ... }}
syntax:{{{curly_example}}
Daniel Schierbeck and Benjamin Quorning
-
Make Curly raise an exception when a reference or comment is not closed.
Daniel Schierbeck
-
Fix a bug that caused an infinite loop when there was whitespace in a reference.
Daniel Schierbeck
-
Fix a bug that caused non-string presenter method return values to be discarded.
Daniel Schierbeck
-
Fix a bug in the compiler that caused some templates to be erroneously HTML escaped.
Daniel Schierbeck
-
Allow comments in Curly templates using the
{{! ... }}
syntax:{{! This is a comment }}
Daniel Schierbeck
-
Better error handling. If a presenter class cannot be found, we not raise a more descriptive exception.
Daniel Schierbeck
-
Include the superclass' dependencies in a presenter's dependency list.
Daniel Schierbeck
-
Allow running setup code before rendering a Curly view. Simply add a
#setup!
method to your presenter – it will be called by Curly just before the view is rendered.Daniel Schierbeck