mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-06 07:31:04 -05:00
25 lines
638 B
Ruby
25 lines
638 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
|
|
|
|
# choose 6 recently-signed-in members sort of at random
|
|
@interesting_members = Member.interesting.limit(30).shuffle.first(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
|