mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-05 07:01:03 -05:00
Merge pull request #975 from Growstuff/revert-972-show_concern
Revert "Show concern"
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
class AlternateNamesController < ApplicationController
|
||||
include SimpleShow
|
||||
before_filter :authenticate_member!, except: [:index, :show]
|
||||
load_and_authorize_resource
|
||||
|
||||
@@ -14,6 +13,17 @@ class AlternateNamesController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# GET /alternate_names/1
|
||||
# GET /alternate_names/1.json
|
||||
def show
|
||||
@alternate_name = AlternateName.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.haml
|
||||
format.json { render json: @alternate_name }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /alternate_names/new
|
||||
# GET /alternate_names/new.json
|
||||
def new
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
class CommentsController < ApplicationController
|
||||
include SimpleShow
|
||||
before_filter :authenticate_member!, except: [:index, :show]
|
||||
load_and_authorize_resource
|
||||
|
||||
@@ -15,6 +14,17 @@ class CommentsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# GET /comments/1
|
||||
# GET /comments/1.json
|
||||
def show
|
||||
@comment = Comment.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.json { render json: @comment }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /comments/new
|
||||
# GET /comments/new.json
|
||||
def new
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
module SimpleShow
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
module ClassMethods
|
||||
|
||||
def show
|
||||
@me = self.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.json { render json: @me }
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,5 +1,4 @@
|
||||
class GardensController < ApplicationController
|
||||
include SimpleShow
|
||||
before_filter :authenticate_member!, except: [:index, :show]
|
||||
load_and_authorize_resource
|
||||
|
||||
@@ -19,6 +18,17 @@ class GardensController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# GET /gardens/1
|
||||
# GET /gardens/1.json
|
||||
def show
|
||||
@garden = Garden.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.json { render json: @garden }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /gardens/new
|
||||
# GET /gardens/new.json
|
||||
def new
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
class HarvestsController < ApplicationController
|
||||
include SimpleShow
|
||||
before_filter :authenticate_member!, except: [:index, :show]
|
||||
load_and_authorize_resource
|
||||
|
||||
@@ -28,6 +27,17 @@ class HarvestsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# GET /harvests/1
|
||||
# GET /harvests/1.json
|
||||
def show
|
||||
@harvest = Harvest.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.json { render json: @harvest }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /harvests/new
|
||||
# GET /harvests/new.json
|
||||
def new
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
class PhotosController < ApplicationController
|
||||
include SimpleShow
|
||||
before_filter :authenticate_member!, except: [:index, :show]
|
||||
load_and_authorize_resource
|
||||
|
||||
@@ -14,6 +13,17 @@ class PhotosController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# GET /photos/1
|
||||
# GET /photos/1.json
|
||||
def show
|
||||
@photo = Photo.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.json { render json: @photo }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /photos/new
|
||||
# GET /photos/new.json
|
||||
def new
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
class PlantingsController < ApplicationController
|
||||
include SimpleShow
|
||||
before_filter :authenticate_member!, except: [:index, :show]
|
||||
load_and_authorize_resource
|
||||
|
||||
@@ -28,6 +27,17 @@ class PlantingsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# GET /plantings/1
|
||||
# GET /plantings/1.json
|
||||
def show
|
||||
@planting = Planting.includes(:owner, :crop, :garden, :photos).friendly.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.json { render json: @planting }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /plantings/new
|
||||
# GET /plantings/new.json
|
||||
def new
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
class ScientificNamesController < ApplicationController
|
||||
include SimpleShow
|
||||
before_filter :authenticate_member!, except: [:index, :show]
|
||||
load_and_authorize_resource
|
||||
|
||||
@@ -14,6 +13,17 @@ class ScientificNamesController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# GET /scientific_names/1
|
||||
# GET /scientific_names/1.json
|
||||
def show
|
||||
@scientific_name = ScientificName.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.haml
|
||||
format.json { render json: @scientific_name }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /scientific_names/new
|
||||
# GET /scientific_names/new.json
|
||||
def new
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
class SeedsController < ApplicationController
|
||||
include SimpleShow
|
||||
before_filter :authenticate_member!, except: [:index, :show]
|
||||
load_and_authorize_resource
|
||||
|
||||
@@ -33,6 +32,17 @@ class SeedsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
# GET /seeds/1
|
||||
# GET /seeds/1.json
|
||||
def show
|
||||
@seed = Seed.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
format.html # show.html.erb
|
||||
format.json { render json: @seed }
|
||||
end
|
||||
end
|
||||
|
||||
# GET /seeds/new
|
||||
# GET /seeds/new.json
|
||||
def new
|
||||
|
||||
Reference in New Issue
Block a user