| Class | Mapping |
| In: |
app/models/mapping.rb
|
| Parent: | ActiveRecord::Base |
Mappings map parts of folder hierarchy to a specific symbol and rules.
Example action:
class GalleryController < Application
def list
@gallery = Mapping[:Gallery]
end
end
Example view:
<ul>
<% for image in @gallery.fetch_all %>
<li><%= mw :link => :link, :document => image %> in <b><%= image.folder_name %> section</b></li>
<% end %>
</ul>
| folder | [rw] | Root folder of a mapping |
| index | [rw] | Mapping’s index document |
| info | [rw] | Optional description |
| items_on_page | [rw] | Paginator info - items on page |
| sort_by | [rw] | Field to sort documents stored in mapping by |
| sort_order | [rw] | ASC or DESC |
| symbol | [rw] |