blob: c6a4e7e7f5e63e7d5943be57ccf4271ef2a5a3f8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
module Refinery
module GalleryLinks
class GalleryLinksController < ::ApplicationController
before_filter :find_all_gallery_links
before_filter :find_page
def index
# you can use meta fields from your model instead (e.g. browser_title)
# by swapping @page for @gallery_link in the line below:
present(@page)
end
def show
@gallery_link = GalleryLink.find(params[:id])
# you can use meta fields from your model instead (e.g. browser_title)
# by swapping @page for @gallery_link in the line below:
present(@page)
end
protected
def find_all_gallery_links
@gallery_links = GalleryLink.order('position ASC')
end
def find_page
@page = ::Refinery::Page.where(:link_url => "/gallery_links").first
end
end
end
end
|