Rubcop fix up

This commit is contained in:
Brenda Wallace committed 2019-01-06 08:45:42 +13:00
1 parent 62a8f6b8d3
commit 1e6c204df2
5 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
class FollowsController < ApplicationController
before_action :authenticate_member!
before_action :set_member, only: [:index, :followers]
before_action :set_member, only: %i(index followers)
load_and_authorize_resource
skip_load_resource only: :create
+1 -1
View File
@@ -9,7 +9,7 @@ class GardensController < ApplicationController
def index
@owner = Member.find_by(slug: params[:member_slug])
@show_all = params[:all] == '1'
@gardens = @gardens.active unless @show_all
@gardens = @gardens.where(owner: @owner) if @owner.present?
@gardens = @gardens.joins(:owner).order(:name).paginate(page: params[:page])
+1 -1
View File
@@ -15,7 +15,7 @@ class HarvestsController < ApplicationController
@harvests = @harvests.where(crop: @crop) if @crop.present?
@harvests = @harvests.where(planting: @planting) if @planting.present?
@harvests = @harvests.order(harvested_at: :desc).joins(:owner, :crop).paginate(page: params[:page])
@filename = csv_filename
respond_with(@harvests)
+3 -3
View File
@@ -110,9 +110,9 @@ class PlantingsController < ApplicationController
def specifics
if @owner
"#{@owner.login_name}-"
elsif @crop
"#{@crop.name}-"
"#{@owner.login_name}-"
elsif @crop
"#{@crop.name}-"
end
end
end
+1 -1
View File
@@ -68,7 +68,7 @@ class SeedsController < ApplicationController
:finished, :finished_at
)
end
def csv_filename
if @owner
"Growstuff-#{@owner}-Seeds-#{Time.zone.now.to_s(:number)}.csv"