Project

templatr

0.0
No commit activity in last 3 years
No release in over 3 years
Add custom fields to your models.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0

Runtime

~> 3.2
 Project Readme

Templatr¶ ↑

This project rocks and uses MIT-LICENSE.

# Usage

## Reading values To easily output stored values use the tag_value method.

“‘ item = Item.first item.tag_value(’location’) #=> ‘Canada’ # Pass in the field name, and out comes the values item.tag_value(‘Location’) #=> ‘Canada’ # Field name matching is case insensitive item.tag_value(‘materials’) #=> [‘wood’, ‘glass’] # Depending on the field type, an array may be returned item.tag_value(‘fake field’) #=> nil # Fields that don’t have tags return nil “‘