Class: Refinery::Recommendations::RecommendationsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/refinery/recommendations/recommendations_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



8
9
10
11
12
# File 'app/controllers/refinery/recommendations/recommendations_controller.rb', line 8

def index
  # you can use meta fields from your model instead (e.g. browser_title)
  # by swapping @page for @recommendation in the line below:
  present(@page)
end

#showObject



14
15
16
17
18
19
20
# File 'app/controllers/refinery/recommendations/recommendations_controller.rb', line 14

def show
  @recommendation = Recommendation.find(params[:id])
  @other_recommendations = Recommendation.find(:all, :conditions => ["slug != ?", params[:id]])
  # you can use meta fields from your model instead (e.g. browser_title)
  # by swapping @page for @recommendation in the line below:
  present(@page)
end