Sha256: 6005b3e10605f8553381b51929f258f0f94f3a078e59942024cdf08f21984673
Contents?: true
Size: 541 Bytes
Versions: 3
Compression:
Stored size: 541 Bytes
Contents
# Simple extension of Array. The reason we need this class is so that we can make form views play nicely # with our tags. # # For example, we can now write things like this in our form views: # # form_for(@taggable_model) do |f| # <div class="field"> # <%= f.label :tag_list %> # <%= f.text_field :tag_list %> # </div> # end # # This will create a text field as we would expect, and will properly update our model's tags when our model is being changed. # class TagList < Array def to_s self.join " " end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
acts_as_taggable_simple-0.1.0 | lib/tag_list.rb |
acts_as_taggable_simple-0.0.4 | lib/tag_list.rb |
acts_as_taggable_simple-0.0.3 | lib/tag_list.rb |