forked from bofh/fetsite
671 lines
25 KiB
HTML
671 lines
25 KiB
HTML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
|
|
|
|
<title>Class: SemestersController</title>
|
|
|
|
<link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
|
|
|
|
<script src="./js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="./js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="./js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
|
<script src="./js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
</head>
|
|
<body id="top" class="class">
|
|
|
|
<div id="metadata">
|
|
<div id="home-metadata">
|
|
<div id="home-section" class="section">
|
|
<h3 class="section-header">
|
|
<a href="./index.html">Home</a>
|
|
<a href="./index.html#classes">Classes</a>
|
|
<a href="./index.html#methods">Methods</a>
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="file-metadata">
|
|
<div id="file-list-section" class="section">
|
|
<h3 class="section-header">In Files</h3>
|
|
<div class="section-body">
|
|
<ul>
|
|
|
|
<li><a href="./app/controllers/semesters_controller_rb.html?TB_iframe=true&height=550&width=785"
|
|
class="thickbox" title="app/controllers/semesters_controller.rb">app/controllers/semesters_controller.rb</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div id="class-metadata">
|
|
|
|
<!-- Parent Class -->
|
|
<div id="parent-class-section" class="section">
|
|
<h3 class="section-header">Parent</h3>
|
|
|
|
<p class="link"><a href="ApplicationController.html">ApplicationController</a></p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Method Quickref -->
|
|
<div id="method-list-section" class="section">
|
|
<h3 class="section-header">Methods</h3>
|
|
<ul class="link-list">
|
|
|
|
<li><a href="#method-i-create">#create</a></li>
|
|
|
|
<li><a href="#method-i-destroy">#destroy</a></li>
|
|
|
|
<li><a href="#method-i-edit">#edit</a></li>
|
|
|
|
<li><a href="#method-i-index">#index</a></li>
|
|
|
|
<li><a href="#method-i-new">#new</a></li>
|
|
|
|
<li><a href="#method-i-show">#show</a></li>
|
|
|
|
<li><a href="#method-i-update">#update</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div id="project-metadata">
|
|
|
|
|
|
<div id="fileindex-section" class="section project-section">
|
|
<h3 class="section-header">Files</h3>
|
|
<ul>
|
|
|
|
<li class="file"><a href="./doc/README_FOR_APP.html">README_FOR_APP</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div id="classindex-section" class="section project-section">
|
|
<h3 class="section-header">Class/Module Index
|
|
<span class="search-toggle"><img src="./images/find.png"
|
|
height="16" width="16" alt="[+]"
|
|
title="show/hide quicksearch" /></span></h3>
|
|
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
|
<fieldset>
|
|
<legend>Quicksearch</legend>
|
|
<input type="text" name="quicksearch" value=""
|
|
class="quicksearch-field" />
|
|
</fieldset>
|
|
</form>
|
|
|
|
<ul class="link-list">
|
|
|
|
<li><a href="./Flagable.html">Flagable</a></li>
|
|
|
|
<li><a href="./Flagable/ActsAsFlagableController.html">Flagable::ActsAsFlagableController</a></li>
|
|
|
|
<li><a href="./Flagable/ActsAsFlagableController/ClassMethods.html">Flagable::ActsAsFlagableController::ClassMethods</a></li>
|
|
|
|
<li><a href="./Flagable/ActsAsFlagableController/LocalClassMethods.html">Flagable::ActsAsFlagableController::LocalClassMethods</a></li>
|
|
|
|
<li><a href="./Flagable/ActsAsFlagableController/LocalInstanceMethods.html">Flagable::ActsAsFlagableController::LocalInstanceMethods</a></li>
|
|
|
|
<li><a href="./Flagable/ActsAsFlagableRecord.html">Flagable::ActsAsFlagableRecord</a></li>
|
|
|
|
<li><a href="./Flagable/ActsAsFlagableRecord/ClassMethods.html">Flagable::ActsAsFlagableRecord::ClassMethods</a></li>
|
|
|
|
<li><a href="./Flagable/ActsAsFlagableRecord/LocalInstanceMethods.html">Flagable::ActsAsFlagableRecord::LocalInstanceMethods</a></li>
|
|
|
|
<li><a href="./Flagable/FlagableHelper.html">Flagable::FlagableHelper</a></li>
|
|
|
|
<li><a href="./Survey.html">Survey</a></li>
|
|
|
|
<li><a href="./Survey/Answer.html">Survey::Answer</a></li>
|
|
|
|
<li><a href="./Survey/AnswersHelper.html">Survey::AnswersHelper</a></li>
|
|
|
|
<li><a href="./Survey/Choice.html">Survey::Choice</a></li>
|
|
|
|
<li><a href="./Survey/ChoicesController.html">Survey::ChoicesController</a></li>
|
|
|
|
<li><a href="./Survey/ChoicesHelper.html">Survey::ChoicesHelper</a></li>
|
|
|
|
<li><a href="./Survey/Question.html">Survey::Question</a></li>
|
|
|
|
<li><a href="./Survey/QuestionsController.html">Survey::QuestionsController</a></li>
|
|
|
|
<li><a href="./Survey/QuestionsHelper.html">Survey::QuestionsHelper</a></li>
|
|
|
|
<li><a href="./IsCommentable.html">IsCommentable</a></li>
|
|
|
|
<li><a href="./IsCommentable/InstanceMethods.html">IsCommentable::InstanceMethods</a></li>
|
|
|
|
<li><a href="./LikeVoteable.html">LikeVoteable</a></li>
|
|
|
|
<li><a href="./LikeVoteable/InstanceMethods.html">LikeVoteable::InstanceMethods</a></li>
|
|
|
|
<li><a href="./Users.html">Users</a></li>
|
|
|
|
<li><a href="./Users/OmniauthCallbacksController.html">Users::OmniauthCallbacksController</a></li>
|
|
|
|
<li><a href="./Ability.html">Ability</a></li>
|
|
|
|
<li><a href="./ApplicationController.html">ApplicationController</a></li>
|
|
|
|
<li><a href="./ApplicationHelper.html">ApplicationHelper</a></li>
|
|
|
|
<li><a href="./Attachment.html">Attachment</a></li>
|
|
|
|
<li><a href="./AttachmentUploader.html">AttachmentUploader</a></li>
|
|
|
|
<li><a href="./AttachmentsController.html">AttachmentsController</a></li>
|
|
|
|
<li><a href="./AttachmentsHelper.html">AttachmentsHelper</a></li>
|
|
|
|
<li><a href="./Beispiel.html">Beispiel</a></li>
|
|
|
|
<li><a href="./BeispieldateiUploader.html">BeispieldateiUploader</a></li>
|
|
|
|
<li><a href="./BeispieleController.html">BeispieleController</a></li>
|
|
|
|
<li><a href="./BeispieleHelper.html">BeispieleHelper</a></li>
|
|
|
|
<li><a href="./Calendar.html">Calendar</a></li>
|
|
|
|
<li><a href="./CalendarsController.html">CalendarsController</a></li>
|
|
|
|
<li><a href="./CalendarsHelper.html">CalendarsHelper</a></li>
|
|
|
|
<li><a href="./CalentriesController.html">CalentriesController</a></li>
|
|
|
|
<li><a href="./CalentriesHelper.html">CalentriesHelper</a></li>
|
|
|
|
<li><a href="./Calentry.html">Calentry</a></li>
|
|
|
|
<li><a href="./CheckboxAutocompleteInput.html">CheckboxAutocompleteInput</a></li>
|
|
|
|
<li><a href="./Comment.html">Comment</a></li>
|
|
|
|
<li><a href="./CommentsController.html">CommentsController</a></li>
|
|
|
|
<li><a href="./CommentsHelper.html">CommentsHelper</a></li>
|
|
|
|
<li><a href="./ConfigController.html">ConfigController</a></li>
|
|
|
|
<li><a href="./Confirmmailer.html">Confirmmailer</a></li>
|
|
|
|
<li><a href="./CrawlerController.html">CrawlerController</a></li>
|
|
|
|
<li><a href="./Crawlobject.html">Crawlobject</a></li>
|
|
|
|
<li><a href="./CrawlobjectHelper.html">CrawlobjectHelper</a></li>
|
|
|
|
<li><a href="./DateStringInput.html">DateStringInput</a></li>
|
|
|
|
<li><a href="./DatepickerInput.html">DatepickerInput</a></li>
|
|
|
|
<li><a href="./DatetimepickerInput.html">DatetimepickerInput</a></li>
|
|
|
|
<li><a href="./Document.html">Document</a></li>
|
|
|
|
<li><a href="./DocumentsController.html">DocumentsController</a></li>
|
|
|
|
<li><a href="./EmailsController.html">EmailsController</a></li>
|
|
|
|
<li><a href="./Fetprofile.html">Fetprofile</a></li>
|
|
|
|
<li><a href="./FetprofilesController.html">FetprofilesController</a></li>
|
|
|
|
<li><a href="./FetprofilesHelper.html">FetprofilesHelper</a></li>
|
|
|
|
<li><a href="./Fetznedition.html">Fetznedition</a></li>
|
|
|
|
<li><a href="./FetzneditionsController.html">FetzneditionsController</a></li>
|
|
|
|
<li><a href="./FetzneditionsHelper.html">FetzneditionsHelper</a></li>
|
|
|
|
<li><a href="./Foto.html">Foto</a></li>
|
|
|
|
<li><a href="./FotoUploader.html">FotoUploader</a></li>
|
|
|
|
<li><a href="./FotosController.html">FotosController</a></li>
|
|
|
|
<li><a href="./FotosHelper.html">FotosHelper</a></li>
|
|
|
|
<li><a href="./Frage.html">Frage</a></li>
|
|
|
|
<li><a href="./FragenController.html">FragenController</a></li>
|
|
|
|
<li><a href="./FragenHelper.html">FragenHelper</a></li>
|
|
|
|
<li><a href="./GalleriesController.html">GalleriesController</a></li>
|
|
|
|
<li><a href="./GalleriesHelper.html">GalleriesHelper</a></li>
|
|
|
|
<li><a href="./Gallery.html">Gallery</a></li>
|
|
|
|
<li><a href="./GremienController.html">GremienController</a></li>
|
|
|
|
<li><a href="./GremienHelper.html">GremienHelper</a></li>
|
|
|
|
<li><a href="./Gremium.html">Gremium</a></li>
|
|
|
|
<li><a href="./HomeController.html">HomeController</a></li>
|
|
|
|
<li><a href="./Key.html">Key</a></li>
|
|
|
|
<li><a href="./Lecturer.html">Lecturer</a></li>
|
|
|
|
<li><a href="./LecturersController.html">LecturersController</a></li>
|
|
|
|
<li><a href="./LecturersHelper.html">LecturersHelper</a></li>
|
|
|
|
<li><a href="./Lva.html">Lva</a></li>
|
|
|
|
<li><a href="./LvasController.html">LvasController</a></li>
|
|
|
|
<li><a href="./MailerHelper.html">MailerHelper</a></li>
|
|
|
|
<li><a href="./Meeting.html">Meeting</a></li>
|
|
|
|
<li><a href="./MeetingsController.html">MeetingsController</a></li>
|
|
|
|
<li><a href="./MeetingsHelper.html">MeetingsHelper</a></li>
|
|
|
|
<li><a href="./Meetingtyp.html">Meetingtyp</a></li>
|
|
|
|
<li><a href="./MeetingtypsController.html">MeetingtypsController</a></li>
|
|
|
|
<li><a href="./MeetingtypsHelper.html">MeetingtypsHelper</a></li>
|
|
|
|
<li><a href="./Membership.html">Membership</a></li>
|
|
|
|
<li><a href="./MembershipsController.html">MembershipsController</a></li>
|
|
|
|
<li><a href="./MembershipsHelper.html">MembershipsHelper</a></li>
|
|
|
|
<li><a href="./Modul.html">Modul</a></li>
|
|
|
|
<li><a href="./Modulgruppe.html">Modulgruppe</a></li>
|
|
|
|
<li><a href="./ModulgruppenController.html">ModulgruppenController</a></li>
|
|
|
|
<li><a href="./ModulgruppenHelper.html">ModulgruppenHelper</a></li>
|
|
|
|
<li><a href="./ModulsController.html">ModulsController</a></li>
|
|
|
|
<li><a href="./ModulsHelper.html">ModulsHelper</a></li>
|
|
|
|
<li><a href="./Neuigkeit.html">Neuigkeit</a></li>
|
|
|
|
<li><a href="./NeuigkeitenController.html">NeuigkeitenController</a></li>
|
|
|
|
<li><a href="./NewsMailer.html">NewsMailer</a></li>
|
|
|
|
<li><a href="./Nlink.html">Nlink</a></li>
|
|
|
|
<li><a href="./PagesHelper.html">PagesHelper</a></li>
|
|
|
|
<li><a href="./PictureUploader.html">PictureUploader</a></li>
|
|
|
|
<li><a href="./PluginsHelper.html">PluginsHelper</a></li>
|
|
|
|
<li><a href="./Role.html">Role</a></li>
|
|
|
|
<li><a href="./Rubrik.html">Rubrik</a></li>
|
|
|
|
<li><a href="./RubrikenController.html">RubrikenController</a></li>
|
|
|
|
<li><a href="./RubrikenHelper.html">RubrikenHelper</a></li>
|
|
|
|
<li><a href="./Semester.html">Semester</a></li>
|
|
|
|
<li><a href="./SemestersController.html">SemestersController</a></li>
|
|
|
|
<li><a href="./SemestersHelper.html">SemestersHelper</a></li>
|
|
|
|
<li><a href="./StudienController.html">StudienController</a></li>
|
|
|
|
<li><a href="./StudienHelper.html">StudienHelper</a></li>
|
|
|
|
<li><a href="./Studium.html">Studium</a></li>
|
|
|
|
<li><a href="./StudmodsHelper.html">StudmodsHelper</a></li>
|
|
|
|
<li><a href="./Thema.html">Thema</a></li>
|
|
|
|
<li><a href="./ThemenController.html">ThemenController</a></li>
|
|
|
|
<li><a href="./ThemenHelper.html">ThemenHelper</a></li>
|
|
|
|
<li><a href="./Themengruppe.html">Themengruppe</a></li>
|
|
|
|
<li><a href="./ThemengruppenController.html">ThemengruppenController</a></li>
|
|
|
|
<li><a href="./ThemengruppenHelper.html">ThemengruppenHelper</a></li>
|
|
|
|
<li><a href="./TinymceTextInput.html">TinymceTextInput</a></li>
|
|
|
|
<li><a href="./UploaderInput.html">UploaderInput</a></li>
|
|
|
|
<li><a href="./User.html">User</a></li>
|
|
|
|
<li><a href="./UsersController.html">UsersController</a></li>
|
|
|
|
</ul>
|
|
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div id="documentation">
|
|
<h1 class="class">SemestersController</h1>
|
|
|
|
<div id="description" class="description">
|
|
|
|
</div><!-- description -->
|
|
|
|
|
|
|
|
|
|
<div id="5Buntitled-5D" class="documentation-section">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Methods -->
|
|
|
|
<div id="public-instance-method-details" class="method-section section">
|
|
<h3 class="section-header">Public Instance Methods</h3>
|
|
|
|
|
|
<div id="create-method" class="method-detail ">
|
|
<a name="method-i-create"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">create</span><span
|
|
class="method-args">()</span>
|
|
<span class="method-click-advice">click to toggle source</span>
|
|
</div>
|
|
|
|
|
|
<div class="method-description">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-source-code" id="create-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/controllers/semesters_controller.rb, line 22</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">create</span>
|
|
<span class="ruby-ivar">@semester</span> = <span class="ruby-constant">Semester</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:semester</span>])
|
|
|
|
|
|
<span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span>
|
|
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@semester</span>.<span class="ruby-identifier">save</span>
|
|
<span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> <span class="ruby-ivar">@semester</span>, <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Semester was successfully created.'</span> }
|
|
<span class="ruby-keyword">else</span>
|
|
<span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">"new"</span> }
|
|
<span class="ruby-keyword">end</span>
|
|
<span class="ruby-keyword">end</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- create-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- create-method -->
|
|
|
|
|
|
<div id="destroy-method" class="method-detail ">
|
|
<a name="method-i-destroy"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">destroy</span><span
|
|
class="method-args">()</span>
|
|
<span class="method-click-advice">click to toggle source</span>
|
|
</div>
|
|
|
|
|
|
<div class="method-description">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-source-code" id="destroy-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/controllers/semesters_controller.rb, line 47</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">destroy</span>
|
|
<span class="ruby-ivar">@semester</span> = <span class="ruby-constant">Semester</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>])
|
|
<span class="ruby-ivar">@semester</span>.<span class="ruby-identifier">destroy</span>
|
|
<span class="ruby-identifier">redirect_to</span> <span class="ruby-identifier">semester_url</span>
|
|
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- destroy-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- destroy-method -->
|
|
|
|
|
|
<div id="edit-method" class="method-detail ">
|
|
<a name="method-i-edit"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">edit</span><span
|
|
class="method-args">()</span>
|
|
<span class="method-click-advice">click to toggle source</span>
|
|
</div>
|
|
|
|
|
|
<div class="method-description">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-source-code" id="edit-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/controllers/semesters_controller.rb, line 17</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">edit</span>
|
|
<span class="ruby-ivar">@semester</span> = <span class="ruby-constant">Semester</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>])
|
|
<span class="ruby-ivar">@studium</span> = <span class="ruby-ivar">@semester</span>.<span class="ruby-identifier">studium</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- edit-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- edit-method -->
|
|
|
|
|
|
<div id="index-method" class="method-detail ">
|
|
<a name="method-i-index"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">index</span><span
|
|
class="method-args">()</span>
|
|
<span class="method-click-advice">click to toggle source</span>
|
|
</div>
|
|
|
|
|
|
<div class="method-description">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-source-code" id="index-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/controllers/semesters_controller.rb, line 3</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">index</span>
|
|
<span class="ruby-ivar">@semesters</span> = <span class="ruby-constant">Semester</span>.<span class="ruby-identifier">all</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- index-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- index-method -->
|
|
|
|
|
|
<div id="new-method" class="method-detail ">
|
|
<a name="method-i-new"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">new</span><span
|
|
class="method-args">()</span>
|
|
<span class="method-click-advice">click to toggle source</span>
|
|
</div>
|
|
|
|
|
|
<div class="method-description">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-source-code" id="new-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/controllers/semesters_controller.rb, line 13</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">new</span>
|
|
<span class="ruby-ivar">@semester</span> = <span class="ruby-constant">Semester</span>.<span class="ruby-identifier">new</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- new-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- new-method -->
|
|
|
|
|
|
<div id="show-method" class="method-detail ">
|
|
<a name="method-i-show"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">show</span><span
|
|
class="method-args">()</span>
|
|
<span class="method-click-advice">click to toggle source</span>
|
|
</div>
|
|
|
|
|
|
<div class="method-description">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-source-code" id="show-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/controllers/semesters_controller.rb, line 8</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">show</span>
|
|
<span class="ruby-ivar">@semester</span> = <span class="ruby-constant">Semester</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>])
|
|
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- show-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- show-method -->
|
|
|
|
|
|
<div id="update-method" class="method-detail ">
|
|
<a name="method-i-update"></a>
|
|
|
|
|
|
<div class="method-heading">
|
|
<span class="method-name">update</span><span
|
|
class="method-args">()</span>
|
|
<span class="method-click-advice">click to toggle source</span>
|
|
</div>
|
|
|
|
|
|
<div class="method-description">
|
|
|
|
|
|
|
|
|
|
|
|
<div class="method-source-code" id="update-source">
|
|
<pre>
|
|
<span class="ruby-comment"># File app/controllers/semesters_controller.rb, line 35</span>
|
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier">update</span>
|
|
<span class="ruby-ivar">@semester</span> = <span class="ruby-constant">Semester</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:id</span>])
|
|
<span class="ruby-ivar">@studium</span>= <span class="ruby-ivar">@semester</span>.<span class="ruby-identifier">studium</span>
|
|
<span class="ruby-identifier">respond_to</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span><span class="ruby-operator">|</span>
|
|
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@semester</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:semester</span>])
|
|
<span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">redirect_to</span> <span class="ruby-ivar">@semester</span>, <span class="ruby-identifier">notice</span><span class="ruby-operator">:</span> <span class="ruby-string">'Semester was successfully updated.'</span> }
|
|
<span class="ruby-keyword">else</span>
|
|
<span class="ruby-identifier">format</span>.<span class="ruby-identifier">html</span> { <span class="ruby-identifier">render</span> <span class="ruby-identifier">action</span><span class="ruby-operator">:</span> <span class="ruby-string">"edit"</span> }
|
|
<span class="ruby-keyword">end</span>
|
|
<span class="ruby-keyword">end</span>
|
|
<span class="ruby-keyword">end</span></pre>
|
|
</div><!-- update-source -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div><!-- update-method -->
|
|
|
|
|
|
</div><!-- public-instance-method-details -->
|
|
|
|
</div><!-- 5Buntitled-5D -->
|
|
|
|
|
|
</div><!-- documentation -->
|
|
|
|
<div id="validator-badges">
|
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|
Rdoc Generator</a> 2</small>.</p>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|
|
|