Module: Reviewed::Attachable
- Defined in:
- lib/reviewed/attachable.rb
Instance Method Summary collapse
Instance Method Details
#attachments(tag = nil, opts = {}) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/reviewed/attachable.rb', line 4 def tag=nil, opts={} if .include?(tag.to_s) return attributes['attachments'].select { |x| x..include?(tag.to_s) } else (opts.merge!(tags: tag)).to_a end end |
#gallery(tags = nil, num = 8, page = 1) ⇒ Object
12 13 14 |
# File 'lib/reviewed/attachable.rb', line 12 def gallery =nil, num=8, page=1 tags: , :gallery => true, :per_page => num, :page => page, :order => 'priority' end |