Module: Mongoid::Taggable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/mongoid/taggable.rb
Overview
Copyright © 2010 Wilker Lúcio <[email protected]>
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#save_tags_index! ⇒ Object
121 122 123 |
# File 'lib/mongoid/taggable.rb', line 121 def self.class. end |
#tags ⇒ Object
109 110 111 |
# File 'lib/mongoid/taggable.rb', line 109 def ( || []).join(self.class.) end |
#tags=(tags) ⇒ Object
113 114 115 116 117 118 119 |
# File 'lib/mongoid/taggable.rb', line 113 def () if .present? self. = .split(self.class.).map(&:strip).reject(&:blank?) else self. = [] end end |