OSDN Git Service

merge i18n
[pettanr/pettanr.git] / app / controllers / ground_colors_controller.rb
index 123bef7..d5883a6 100644 (file)
@@ -1,7 +1,7 @@
 class GroundColorsController < ApplicationController
   layout 'test' if MagicNumber['test_layout']
-  before_filter :authenticate_user!, :only => [:index]
-  before_filter :authenticate_author, :only => [:index]
+  before_filter :authenticate_user!, :only => [:index, :show]
+  before_filter :authenticate_author, :only => [:index, :show]
 
   # GET /ground_colors
   # GET /ground_colors.json
@@ -15,4 +15,12 @@ class GroundColorsController < ApplicationController
       format.json { render :json => @ground_colors.to_json(GroundColor.list_json_opt) }
     end
   end
+  
+  def show
+    @ground_color = GroundColor.show(params[:id], @author)
+    respond_to do |format|
+      format.html # show.html.erb
+      format.json { render json: @ground_color.to_json(GroundColor.show_json_opt) }
+    end
+  end
 end