Sha256: 204d2ad0b4e7b1895a703cbfeaad99af4a35326a741926f98123e26f850f2fdd
Contents?: true
Size: 820 Bytes
Versions: 9
Compression:
Stored size: 820 Bytes
Contents
require_dependency "disclaimer/application_controller" module Disclaimer class SegmentsController < ApplicationController before_filter :get_segment, :only => [:show, :delete, :destroy, :edit, :update] def index @segments = Segment.all end def show end def new @segment = Segment.new end def create new update end def edit render :new end def update @segment.update_attributes(params[:segment]) redirect_to segment_path(@segment) end def delete end def destroy @segment.destroy redirect_to :controller => 'disclaimer/segments', :action => 'index' end private def get_segment @segment = Segment.find_by_name(params[:id]) end end end
Version data entries
9 entries across 9 versions & 1 rubygems