Project

blush

0.0
No commit activity in last 3 years
No release in over 3 years
View Models for Rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 0
 Project Readme

Blush

View-Models for Rails.

Installation

gem 'blush'

Usage

class Comment < ActiveRecord::Base
  has_presenter
end

class CommentPresenter < Blush::Presenter
  def content
    h.simple_format(object.content)
  end
end

# explicitly call the presenter methods
@comment.presenter.content

# delegate to the model if method doesn't exist on presenter
@comment.present(:content)