mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-27 10:47:55 -05:00
- only show interesting members if logged out - don't show your recent posts/plantings - change limits on posts/plantings for better visual balance.
24 lines
560 B
Ruby
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
|