Files
growstuff/app/controllers/home_controller.rb
Miles Gould a0c91ee884 Changes to homepage
- only show interesting members if logged out
 - don't show your recent posts/plantings
 - change limits on posts/plantings for better visual balance.
2013-06-04 12:59:37 +01:00

24 lines
560 B
Ruby

class HomeController < ApplicationController
skip_authorize_resource
def index
@member_count = Member.confirmed.count
@crop_count = Crop.count
@planting_count = Planting.count
@garden_count = Garden.count
@interesting_members = Member.interesting.limit(6)
# customise what we show on the homepage based on whether you're
# logged in or not.
@member = current_member
@plantings = Planting.limit(15)
@posts = Post.limit(10)
respond_to do |format|
format.html # index.html.haml
end
end
end