Simple extension of Merb's display() that chooses templates based on an object's state
License
iandb/merb_stateful_display
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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"
About
Simple extension of Merb's display() that chooses templates based on an object's state
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published