No commit activity in last 3 years
No release in over 3 years
Simple extension of Merb's display() that chooses templates based on an object's state
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.9.10
 Project Readme
merb_stateful_display
=====================

stateful_display()
Works like display, but checks to see if the object has a 'state'
method.  Especially useful in show and edit, where it will check 
a given object and look for a template to match the current state
of the object.

EX:
def show
  ...
  @ord.state = 'in_cart'
  sdisplay(@ord)
end

Looks for a template named "show_in_cart.html.erb" else it falls
back to a standard behavior of "show.html.erb"