OSDN Git Service

unuse actions
authornomeu <nomeu@users.sourceforge.jp>
Wed, 17 Oct 2012 04:52:20 +0000 (13:52 +0900)
committernomeu <nomeu@users.sourceforge.jp>
Wed, 17 Oct 2012 04:52:20 +0000 (13:52 +0900)
app/controllers/arcs_controller.rb
app/controllers/locations_controller.rb [deleted file]
app/controllers/pmds_controller.rb
app/controllers/thumbs_controller.rb
app/controllers/vmds_controller.rb
app/controllers/xes_controller.rb
config/routes.rb

index 62b0876..5109b24 100644 (file)
@@ -18,12 +18,6 @@ class ArcsController < ApplicationController
   # GET /arcs/1
   # GET /arcs/1.xml
   def show
-    if /\A\d/.match(params[:id])
-      @rec = Record::Arc.find(params[:id])
-      @arc = Arc.find(@rec.code)
-      redirect_to arc_path(@arc), :status => 301
-      return
-    end
     @arc = Arc.find(params[:id])
 
     respond_to do |format|
@@ -31,66 +25,4 @@ class ArcsController < ApplicationController
       format.xml  { render :xml => @arc }
     end
   end
-
-  # GET /arcs/new
-  # GET /arcs/new.xml
-  def new
-    @arc = Record::Arc.new
-
-    respond_to do |format|
-      format.html # new.html.erb
-      format.xml  { render :xml => @arc }
-    end
-  end
-
-  # GET /arcs/1/edit
-  def edit
-    @arc = Record::Arc.find(params[:id])
-  end
-
-  # POST /arcs
-  # POST /arcs.xml
-  def create
-    @arc = Record::Arc.new(params[:arc])
-
-    respond_to do |format|
-      if @arc.save
-        flash[:notice] = 'Record::Arc was successfully created.'
-        format.html { redirect_to(@arc) }
-        format.xml  { render :xml => @arc, :status => :created, :location => @arc }
-      else
-        format.html { render :action => "new" }
-        format.xml  { render :xml => @arc.errors, :status => :unprocessable_entity }
-      end
-    end
-  end
-
-  # PUT /arcs/1
-  # PUT /arcs/1.xml
-  def update
-    @arc = Record::Arc.find(params[:id])
-
-    respond_to do |format|
-      if @arc.update_attributes(params[:arc])
-        flash[:notice] = 'Record::Arc was successfully updated.'
-        format.html { redirect_to(@arc) }
-        format.xml  { head :ok }
-      else
-        format.html { render :action => "edit" }
-        format.xml  { render :xml => @arc.errors, :status => :unprocessable_entity }
-      end
-    end
-  end
-
-  # DELETE /arcs/1
-  # DELETE /arcs/1.xml
-  def destroy
-    @arc = Record::Arc.find(params[:id])
-    @arc.destroy
-
-    respond_to do |format|
-      format.html { redirect_to(arcs_url) }
-      format.xml  { head :ok }
-    end
-  end
 end
diff --git a/app/controllers/locations_controller.rb b/app/controllers/locations_controller.rb
deleted file mode 100644 (file)
index f7c3046..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-class LocationsController < ApplicationController
-  include AuthenticatedSystem
-  layout 'arcs'
-  before_filter :login_required, :only => [ :new, :edit, :create, :update, :destroy ]
-
-  # GET /locations
-  # GET /locations.xml
-  def index
-    @locations = Record::Location.all
-
-    respond_to do |format|
-      format.html # index.html.erb
-      format.xml  { render :xml => @locations }
-    end
-  end
-
-  # GET /locations/1
-  # GET /locations/1.xml
-  def show
-    @location = Record::Location.find(params[:id])
-
-    respond_to do |format|
-      format.html # show.html.erb
-      format.xml  { render :xml => @location }
-    end
-  end
-
-  # GET /locations/new
-  # GET /locations/new.xml
-  def new
-    @location = Record::Location.new
-
-    respond_to do |format|
-      format.html # new.html.erb
-      format.xml  { render :xml => @location }
-    end
-  end
-
-  # GET /locations/1/edit
-  def edit
-    @location = Record::Location.find(params[:id])
-  end
-
-  # POST /locations
-  # POST /locations.xml
-  def create
-    @location = Record::Location.new(params[:location])
-
-    respond_to do |format|
-      if @location.save
-        flash[:notice] = 'Record::Location was successfully created.'
-        format.html { redirect_to(@location) }
-        format.xml  { render :xml => @location, :status => :created, :location => @location }
-      else
-        format.html { render :action => "new" }
-        format.xml  { render :xml => @location.errors, :status => :unprocessable_entity }
-      end
-    end
-  end
-
-  # PUT /locations/1
-  # PUT /locations/1.xml
-  def update
-    @location = Record::Location.find(params[:id])
-
-    respond_to do |format|
-      if @location.update_attributes(params[:location])
-        flash[:notice] = 'Record::Location was successfully updated.'
-        format.html { redirect_to(@location) }
-        format.xml  { head :ok }
-      else
-        format.html { render :action => "edit" }
-        format.xml  { render :xml => @location.errors, :status => :unprocessable_entity }
-      end
-    end
-  end
-
-  # DELETE /locations/1
-  # DELETE /locations/1.xml
-  def destroy
-    @location = Record::Location.find(params[:id])
-    @location.destroy
-
-    respond_to do |format|
-      format.html { redirect_to(locations_url) }
-      format.xml  { head :ok }
-    end
-  end
-end
index bb017f9..bc72150 100644 (file)
@@ -14,77 +14,4 @@ class PmdsController < ApplicationController
       format.xml  { render :xml => @pmds }
     end
   end
-
-  # GET /pmds/1
-  # GET /pmds/1.xml
-  def show
-    @pmd = Record::Pmd.find(params[:id])
-
-    respond_to do |format|
-      format.html # show.html.erb
-      format.xml  { render :xml => @pmd }
-    end
-  end
-
-  # GET /pmds/new
-  # GET /pmds/new.xml
-  def new
-    @pmd = Record::Pmd.new
-
-    respond_to do |format|
-      format.html # new.html.erb
-      format.xml  { render :xml => @pmd }
-    end
-  end
-
-  # GET /pmds/1/edit
-  def edit
-    @pmd = Record::Pmd.find(params[:id])
-  end
-
-  # POST /pmds
-  # POST /pmds.xml
-  def create
-    @pmd = Record::Pmd.new(params[:pmd])
-
-    respond_to do |format|
-      if @pmd.save
-        flash[:notice] = 'Record::Pmd was successfully created.'
-        format.html { redirect_to(@pmd) }
-        format.xml  { render :xml => @pmd, :status => :created, :location => @pmd }
-      else
-        format.html { render :action => "new" }
-        format.xml  { render :xml => @pmd.errors, :status => :unprocessable_entity }
-      end
-    end
-  end
-
-  # PUT /pmds/1
-  # PUT /pmds/1.xml
-  def update
-    @pmd = Record::Pmd.find(params[:id])
-
-    respond_to do |format|
-      if @pmd.update_attributes(params[:pmd])
-        flash[:notice] = 'Record::Pmd was successfully updated.'
-        format.html { redirect_to(@pmd) }
-        format.xml  { head :ok }
-      else
-        format.html { render :action => "edit" }
-        format.xml  { render :xml => @pmd.errors, :status => :unprocessable_entity }
-      end
-    end
-  end
-
-  # DELETE /pmds/1
-  # DELETE /pmds/1.xml
-  def destroy
-    @pmd = Record::Pmd.find(params[:id])
-    @pmd.destroy
-
-    respond_to do |format|
-      format.html { redirect_to(pmds_url) }
-      format.xml  { head :ok }
-    end
-  end
 end
index c6b768a..b018b78 100644 (file)
@@ -25,67 +25,4 @@ class ThumbsController < ApplicationController
       format.xml  { render :xml => @thumb }
     end
   end
-
-  # GET /thumbs/new
-  # GET /thumbs/new.xml
-  def new
-    @thumb = Record::Thumb.new
-
-    respond_to do |format|
-      format.html # new.html.erb
-      format.xml  { render :xml => @thumb }
-    end
-  end
-
-  # GET /thumbs/1/edit
-  def edit
-    @thumb = Record::Thumb.find(params[:id])
-  end
-
-  # POST /thumbs
-  # POST /thumbs.xml
-  def create
-    @thumb = Record::Thumb.new(params[:thumb])
-    @thumb.video_id = params[:thumb].delete(:video_id)
-
-    respond_to do |format|
-      if @thumb.save
-        flash[:notice] = 'Record::Thumb was successfully created.'
-        format.html { redirect_to(@thumb) }
-        format.xml  { render :xml => @thumb, :status => :created, :location => @thumb }
-      else
-        format.html { render :action => "new" }
-        format.xml  { render :xml => @thumb.errors, :status => :unprocessable_entity }
-      end
-    end
-  end
-
-  # PUT /thumbs/1
-  # PUT /thumbs/1.xml
-  def update
-    @thumb = Record::Thumb.find(params[:id])
-
-    respond_to do |format|
-      if @thumb.update_attributes(params[:thumb])
-        flash[:notice] = 'Record::Thumb was successfully updated.'
-        format.html { redirect_to(@thumb) }
-        format.xml  { head :ok }
-      else
-        format.html { render :action => "edit" }
-        format.xml  { render :xml => @thumb.errors, :status => :unprocessable_entity }
-      end
-    end
-  end
-
-  # DELETE /thumbs/1
-  # DELETE /thumbs/1.xml
-  def destroy
-    @thumb = Record::Thumb.find(params[:id])
-    @thumb.destroy
-
-    respond_to do |format|
-      format.html { redirect_to(thumbs_url) }
-      format.xml  { head :ok }
-    end
-  end
 end
index 7e2628f..b51084d 100644 (file)
@@ -14,77 +14,4 @@ class VmdsController < ApplicationController
       format.xml  { render :xml => @vmds }
     end
   end
-
-  # GET /vmds/1
-  # GET /vmds/1.xml
-  def show
-    @vmd = Record::Vmd.find(params[:id])
-
-    respond_to do |format|
-      format.html # show.html.erb
-      format.xml  { render :xml => @vmd }
-    end
-  end
-
-  # GET /vmds/new
-  # GET /vmds/new.xml
-  def new
-    @vmd = Record::Vmd.new
-
-    respond_to do |format|
-      format.html # new.html.erb
-      format.xml  { render :xml => @vmd }
-    end
-  end
-
-  # GET /vmds/1/edit
-  def edit
-    @vmd = Record::Vmd.find(params[:id])
-  end
-
-  # POST /vmds
-  # POST /vmds.xml
-  def create
-    @vmd = Record::Vmd.new(params[:vmd])
-
-    respond_to do |format|
-      if @vmd.save
-        flash[:notice] = 'Record::Vmd was successfully created.'
-        format.html { redirect_to(@vmd) }
-        format.xml  { render :xml => @vmd, :status => :created, :location => @vmd }
-      else
-        format.html { render :action => "new" }
-        format.xml  { render :xml => @vmd.errors, :status => :unprocessable_entity }
-      end
-    end
-  end
-
-  # PUT /vmds/1
-  # PUT /vmds/1.xml
-  def update
-    @vmd = Record::Vmd.find(params[:id])
-
-    respond_to do |format|
-      if @vmd.update_attributes(params[:vmd])
-        flash[:notice] = 'Record::Vmd was successfully updated.'
-        format.html { redirect_to(@vmd) }
-        format.xml  { head :ok }
-      else
-        format.html { render :action => "edit" }
-        format.xml  { render :xml => @vmd.errors, :status => :unprocessable_entity }
-      end
-    end
-  end
-
-  # DELETE /vmds/1
-  # DELETE /vmds/1.xml
-  def destroy
-    @vmd = Record::Vmd.find(params[:id])
-    @vmd.destroy
-
-    respond_to do |format|
-      format.html { redirect_to(vmds_url) }
-      format.xml  { head :ok }
-    end
-  end
 end
index 952c0bc..00ccb93 100644 (file)
@@ -14,77 +14,4 @@ class XesController < ApplicationController
       format.xml  { render :xml => @xes }
     end
   end
-
-  # GET /xes/1
-  # GET /xes/1.xml
-  def show
-    @x = Record::X.find(params[:id])
-
-    respond_to do |format|
-      format.html # show.html.erb
-      format.xml  { render :xml => @x }
-    end
-  end
-
-  # GET /xes/new
-  # GET /xes/new.xml
-  def new
-    @x = Record::X.new
-
-    respond_to do |format|
-      format.html # new.html.erb
-      format.xml  { render :xml => @x }
-    end
-  end
-
-  # GET /xes/1/edit
-  def edit
-    @x = Record::X.find(params[:id])
-  end
-
-  # POST /xes
-  # POST /xes.xml
-  def create
-    @x = Record::X.new(params[:x])
-
-    respond_to do |format|
-      if @x.save
-        flash[:notice] = 'Record::X was successfully created.'
-        format.html { redirect_to(@x) }
-        format.xml  { render :xml => @x, :status => :created, :location => @x }
-      else
-        format.html { render :action => "new" }
-        format.xml  { render :xml => @x.errors, :status => :unprocessable_entity }
-      end
-    end
-  end
-
-  # PUT /xes/1
-  # PUT /xes/1.xml
-  def update
-    @x = Record::X.find(params[:id])
-
-    respond_to do |format|
-      if @x.update_attributes(params[:x])
-        flash[:notice] = 'Record::X was successfully updated.'
-        format.html { redirect_to(@x) }
-        format.xml  { head :ok }
-      else
-        format.html { render :action => "edit" }
-        format.xml  { render :xml => @x.errors, :status => :unprocessable_entity }
-      end
-    end
-  end
-
-  # DELETE /xes/1
-  # DELETE /xes/1.xml
-  def destroy
-    @x = Record::X.find(params[:id])
-    @x.destroy
-
-    respond_to do |format|
-      format.html { redirect_to(xes_url) }
-      format.xml  { head :ok }
-    end
-  end
 end
index 35b1807..83bf6a9 100644 (file)
@@ -1,12 +1,11 @@
 Nimono::Application.routes.draw do
-  resources :sites
+  resources :sites, :only => [ :index, :show ]
 
-  resources :arcs
-  resources :pmds
-  resources :vmds
-  resources :xes
-  resources :locations
-  resources :thumbs
+  resources :arcs, :only => [ :index, :show ]
+  resources :pmds, :only => :index
+  resources :vmds, :only => :index
+  resources :xes, :only => :index
+  resources :thumbs, :only => [ :index, :show ]
   resource :session
   root :to => 'welcome#index'
   get 'welcome/about'