mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-04-13 19:38:56 -04:00
DRY the homes controller
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
class HomeController < ApplicationController
|
||||
skip_authorize_resource
|
||||
respond_to :html
|
||||
|
||||
def index
|
||||
# we were previously generating a lot of instance variables like
|
||||
# @members_count and @interesting_crops in here, but now we call
|
||||
# the relevant class methods directly in the view, so that fragment
|
||||
# caching will be effective.
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.haml
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user