Browse the Ruby on Rails Community.

You are here: Browse Railsplugins Simple Text Fields

Simple Text Fields

This plugin will remove tags from your models’ string and text fields. This is thought for those parts of your model where you expect text without tags, in stead of striping the tags in the views, as is commonly done, you can use this plugin without being afraid of forgetting the ‘h’ in <%= h @post.title %>, just use <%= @post.title %>

simple_text_fields can receive two options. Usage is as follows:

- simple_text_fields
  will strip tags from all the string and text fields.
- simple_text_fields :only => :title
  will strip tags only in title.
simple_text_fields :only => [:title, :brief]
will strip tags only in title and brief.
- simple_text_fields :except => :title
  will strip tags from all the fields except title.
- simple_text_fields :except => [:title, :brief]
  will strip tags from all the fields except title and brief.

NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly

Users


See all details


Membership

+ Join this railsplugin

Record Maintainer

'None'