# class SemestersController

### Public Instance Methods

create() click to toggle source

    # File controllers/semesters_controller.rb, line 21
    def create
      @semester = Semester.new(params[:semester])

      respond_to do |format|
        if @semester.save
          format.html { redirect_to @semester, notice: 'Semester was successfully created.' }
        else
          format.html { render action: "new" }
        end
      end
    end

destroy() click to toggle source

    # File controllers/semesters_controller.rb, line 45
      def destroy
        @semester = Semester.find(params[:id])
        @semester.destroy
    redirect_to semester_url

      end

edit() click to toggle source

    # File controllers/semesters_controller.rb, line 17
    def edit
      @semester = Semester.find(params[:id])
    end

index() click to toggle source

    # File controllers/semesters_controller.rb, line 3
    def index
      @semesters = Semester.all
    end

new() click to toggle source

    # File controllers/semesters_controller.rb, line 13
    def new
      @semester = Semester.new
    end

show() click to toggle source

    # File controllers/semesters_controller.rb, line 8
    def show
      @semester = Semester.find(params[:id])

    end

update() click to toggle source

    # File controllers/semesters_controller.rb, line 33
    def update
      @semester = Semester.find(params[:id])

      respond_to do |format|
        if @semester.update_attributes(params[:semester])
          format.html { redirect_to @semester, notice: 'Semester was successfully updated.' }
        else
          format.html { render action: "edit" }
        end
      end
    end