<!DOCTYPE html>

<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">

<title>class Settings::LanguagesController - Rails Application Documentation</title>

<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
</script>

<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>


<body id="top" class="class">
<nav id="metadata">
  <nav id="home-section" class="section">
  <h3 class="section-header">
    <a href="../index.html">Home</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </h3>
</nav>


  <nav id="search-section" class="section project-section" class="initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <h3 class="section-header">
      <input type="text" name="search" placeholder="Search" id="search-field"
             title="Type to search, Up and Down to navigate, Enter to load">
    </h3>
  </form>

  <ul id="search-results" class="initially-hidden"></ul>
</nav>


  <div id="file-metadata">
    <nav id="file-list-section" class="section">
  <h3 class="section-header">Defined In</h3>
  <ul>
    <li>app/controllers/settings/languages_controller.rb
  </ul>
</nav>

    
  </div>

  <div id="class-metadata">
    
    <nav id="parent-class-section" class="section">
  <h3 class="section-header">Parent</h3>
  
  <p class="link"><a href="../ApplicationController.html">ApplicationController</a>
  
</nav>

    
    <!-- Method Quickref -->
<nav 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><a href="#method-i-destroy">#destroy</a>
    
    <li><a href="#method-i-edit">#edit</a>
    
    <li><a href="#method-i-index">#index</a>
    
    <li><a href="#method-i-show">#show</a>
    
    <li><a href="#method-i-update">#update</a>
    
  </ul>
</nav>

  </div>

  <div id="project-metadata">
    <nav id="fileindex-section" class="section project-section">
  <h3 class="section-header">Pages</h3>

  <ul>
  
    <li class="file"><a href="../doc/README_FOR_APP.html">README_FOR_APP</a>
  
  </ul>
</nav>

    <nav id="classindex-section" class="section project-section">
  <h3 class="section-header">Class and Module Index</h3>

  <ul class="link-list">
  
    <li><a href="../People.html">People</a>
  
    <li><a href="../People/ActivitiesController.html">People::ActivitiesController</a>
  
    <li><a href="../People/Affairs.html">People::Affairs</a>
  
    <li><a href="../People/Affairs/InvoicesController.html">People::Affairs::InvoicesController</a>
  
    <li><a href="../People/Affairs/ReceiptsController.html">People::Affairs::ReceiptsController</a>
  
    <li><a href="../People/Affairs/SubscriptionsController.html">People::Affairs::SubscriptionsController</a>
  
    <li><a href="../People/AffairsController.html">People::AffairsController</a>
  
    <li><a href="../People/CommentsController.html">People::CommentsController</a>
  
    <li><a href="../People/CommunicationLanguagesController.html">People::CommunicationLanguagesController</a>
  
    <li><a href="../People/EmploymentContractsController.html">People::EmploymentContractsController</a>
  
    <li><a href="../People/HistoriesController.html">People::HistoriesController</a>
  
    <li><a href="../People/HistoriesHelper.html">People::HistoriesHelper</a>
  
    <li><a href="../People/PermissionsController.html">People::PermissionsController</a>
  
    <li><a href="../People/PrivateTagsController.html">People::PrivateTagsController</a>
  
    <li><a href="../People/PublicTagsController.html">People::PublicTagsController</a>
  
    <li><a href="../People/QueryPresetsHelper.html">People::QueryPresetsHelper</a>
  
    <li><a href="../People/RolesController.html">People::RolesController</a>
  
    <li><a href="../People/Salaries.html">People::Salaries</a>
  
    <li><a href="../People/Salaries/ItemsController.html">People::Salaries::ItemsController</a>
  
    <li><a href="../People/Salaries/SalariesController.html">People::Salaries::SalariesController</a>
  
    <li><a href="../People/Salaries/TaxDataController.html">People::Salaries::TaxDataController</a>
  
    <li><a href="../People/TasksController.html">People::TasksController</a>
  
    <li><a href="../People/TranslationAptitudesController.html">People::TranslationAptitudesController</a>
  
    <li><a href="../Exporter.html">Exporter</a>
  
    <li><a href="../Exporter/Banana.html">Exporter::Banana</a>
  
    <li><a href="../Exporter/Base.html">Exporter::Base</a>
  
    <li><a href="../Exporter/Csv.html">Exporter::Csv</a>
  
    <li><a href="../Exporter/Elohnausweisssk.html">Exporter::Elohnausweisssk</a>
  
    <li><a href="../Exporter/Employee.html">Exporter::Employee</a>
  
    <li><a href="../Exporter/Employer.html">Exporter::Employer</a>
  
    <li><a href="../Exporter/Factory.html">Exporter::Factory</a>
  
    <li><a href="../Exporter/Git.html">Exporter::Git</a>
  
    <li><a href="../Exporter/Invoices.html">Exporter::Invoices</a>
  
    <li><a href="../Exporter/Ocas.html">Exporter::Ocas</a>
  
    <li><a href="../Exporter/OfficeMaker.html">Exporter::OfficeMaker</a>
  
    <li><a href="../Exporter/Receipts.html">Exporter::Receipts</a>
  
    <li><a href="../Exporter/Resource.html">Exporter::Resource</a>
  
    <li><a href="../Exporter/Salaries.html">Exporter::Salaries</a>
  
    <li><a href="../Exporter/SalaryCertificate.html">Exporter::SalaryCertificate</a>
  
    <li><a href="../Exporter/Taxes.html">Exporter::Taxes</a>
  
    <li><a href="../Mailchimp.html">Mailchimp</a>
  
    <li><a href="../Mailchimp/ApiFilter.html">Mailchimp::ApiFilter</a>
  
    <li><a href="../Mailchimp/DeleteUnusedEmailsOnMailchimp.html">Mailchimp::DeleteUnusedEmailsOnMailchimp</a>
  
    <li><a href="../Mailchimp/GroupingNotFoundError.html">Mailchimp::GroupingNotFoundError</a>
  
    <li><a href="../Mailchimp/ListConnection.html">Mailchimp::ListConnection</a>
  
    <li><a href="../Mailchimp/MailchimpSyncError.html">Mailchimp::MailchimpSyncError</a>
  
    <li><a href="../Mailchimp/PersonConverter.html">Mailchimp::PersonConverter</a>
  
    <li><a href="../Mailchimp/Process.html">Mailchimp::Process</a>
  
    <li><a href="../Mailchimp/Report.html">Mailchimp::Report</a>
  
    <li><a href="../Mailchimp/SynchronizeEmails.html">Mailchimp::SynchronizeEmails</a>
  
    <li><a href="../Mailchimp/SynchronizeGroupings.html">Mailchimp::SynchronizeGroupings</a>
  
    <li><a href="../Mailchimp/SynchronizeMergeVars.html">Mailchimp::SynchronizeMergeVars</a>
  
    <li><a href="../Mailchimp/Synchronizer.html">Mailchimp::Synchronizer</a>
  
    <li><a href="../Mailchimp/Task.html">Mailchimp::Task</a>
  
    <li><a href="../Salaries.html">Salaries</a>
  
    <li><a href="../Salaries/Item.html">Salaries::Item</a>
  
    <li><a href="../Salaries/SalariesController.html">Salaries::SalariesController</a>
  
    <li><a href="../Salaries/Salary.html">Salaries::Salary</a>
  
    <li><a href="../Salaries/SalaryTemplate.html">Salaries::SalaryTemplate</a>
  
    <li><a href="../Salaries/SalaryTemplatesController.html">Salaries::SalaryTemplatesController</a>
  
    <li><a href="../Salaries/Tax.html">Salaries::Tax</a>
  
    <li><a href="../Salaries/TaxData.html">Salaries::TaxData</a>
  
    <li><a href="../Salaries/Taxes.html">Salaries::Taxes</a>
  
    <li><a href="../Salaries/Taxes/Age.html">Salaries::Taxes::Age</a>
  
    <li><a href="../Salaries/Taxes/Generic.html">Salaries::Taxes::Generic</a>
  
    <li><a href="../Salaries/Taxes/Is.html">Salaries::Taxes::Is</a>
  
    <li><a href="../Salaries/TaxesController.html">Salaries::TaxesController</a>
  
    <li><a href="../Settings.html">Settings</a>
  
    <li><a href="../Settings/ApplicationSettingsController.html">Settings::ApplicationSettingsController</a>
  
    <li><a href="../Settings/InvoiceTemplatesController.html">Settings::InvoiceTemplatesController</a>
  
    <li><a href="../Settings/JobsController.html">Settings::JobsController</a>
  
    <li><a href="../Settings/LanguagesController.html">Settings::LanguagesController</a>
  
    <li><a href="../Settings/LdapAttributesController.html">Settings::LdapAttributesController</a>
  
    <li><a href="../Settings/LocationsController.html">Settings::LocationsController</a>
  
    <li><a href="../Settings/PermissionsController.html">Settings::PermissionsController</a>
  
    <li><a href="../Settings/Roles.html">Settings::Roles</a>
  
    <li><a href="../Settings/Roles/PermissionsController.html">Settings::Roles::PermissionsController</a>
  
    <li><a href="../Settings/RolesController.html">Settings::RolesController</a>
  
    <li><a href="../Settings/SearchAttributesController.html">Settings::SearchAttributesController</a>
  
    <li><a href="../Admin.html">Admin</a>
  
    <li><a href="../Admin/AffairsController.html">Admin::AffairsController</a>
  
    <li><a href="../Admin/BankImportHistoriesController.html">Admin::BankImportHistoriesController</a>
  
    <li><a href="../Admin/BankImportHistoriesHelper.html">Admin::BankImportHistoriesHelper</a>
  
    <li><a href="../Admin/InvoicesController.html">Admin::InvoicesController</a>
  
    <li><a href="../Admin/PrivateTagsController.html">Admin::PrivateTagsController</a>
  
    <li><a href="../Admin/PublicTagsController.html">Admin::PublicTagsController</a>
  
    <li><a href="../Admin/ReceiptsController.html">Admin::ReceiptsController</a>
  
    <li><a href="../Admin/SubscriptionsController.html">Admin::SubscriptionsController</a>
  
    <li><a href="../BackgroundTasks.html">BackgroundTasks</a>
  
    <li><a href="../BackgroundTasks/AddPeopleToSubscriptionAndEmail.html">BackgroundTasks::AddPeopleToSubscriptionAndEmail</a>
  
    <li><a href="../BackgroundTasks/ConcatAndEmailSubscriptionPdf.html">BackgroundTasks::ConcatAndEmailSubscriptionPdf</a>
  
    <li><a href="../BackgroundTasks/GenerateInvoicePdf.html">BackgroundTasks::GenerateInvoicePdf</a>
  
    <li><a href="../BackgroundTasks/GenerateSalaryPdf.html">BackgroundTasks::GenerateSalaryPdf</a>
  
    <li><a href="../BackgroundTasks/PrepareSubscriptionPdfsAndEmail.html">BackgroundTasks::PrepareSubscriptionPdfsAndEmail</a>
  
    <li><a href="../BackgroundTasks/RunRakeTask.html">BackgroundTasks::RunRakeTask</a>
  
    <li><a href="../BackgroundTasks/UpdateIndexForPeople.html">BackgroundTasks::UpdateIndexForPeople</a>
  
    <li><a href="../BackgroundTasks/UpdateSubscriptionInvoicesAndEmail.html">BackgroundTasks::UpdateSubscriptionInvoicesAndEmail</a>
  
    <li><a href="../ElasticSearch.html">ElasticSearch</a>
  
    <li><a href="../ElasticSearch/AutomaticPeopleReindexing.html">ElasticSearch::AutomaticPeopleReindexing</a>
  
    <li><a href="../ElasticSearch/Indexing.html">ElasticSearch::Indexing</a>
  
    <li><a href="../ElasticSearch/Mapping.html">ElasticSearch::Mapping</a>
  
    <li><a href="../BankImporter.html">BankImporter</a>
  
    <li><a href="../BankImporter/Postfinance.html">BankImporter::Postfinance</a>
  
    <li><a href="../BankImporter/Postfinance/ParsingError.html">BankImporter::Postfinance::ParsingError</a>
  
    <li><a href="../ApplicationController.html">ApplicationController</a>
  
    <li><a href="../ApplicationController/InvalidParameters.html">ApplicationController::InvalidParameters</a>
  
    <li><a href="../ApplicationSetting.html">ApplicationSetting</a>
  
    <li><a href="../ApplicationSetting/MissingAttribute.html">ApplicationSetting::MissingAttribute</a>
  
    <li><a href="../ChangesTracker.html">ChangesTracker</a>
  
    <li><a href="../ChangesTracker/ClassMethods.html">ChangesTracker::ClassMethods</a>
  
    <li><a href="../Directory.html">Directory</a>
  
    <li><a href="../Directory/QueryPresetsController.html">Directory::QueryPresetsController</a>
  
    <li><a href="../StatusExtention.html">StatusExtention</a>
  
    <li><a href="../StatusExtention/ClassMethods.html">StatusExtention::ClassMethods</a>
  
    <li><a href="../Ability.html">Ability</a>
  
    <li><a href="../Activity.html">Activity</a>
  
    <li><a href="../AdminController.html">AdminController</a>
  
    <li><a href="../Affair.html">Affair</a>
  
    <li><a href="../AffairsDatatable.html">AffairsDatatable</a>
  
    <li><a href="../AffairsSubscription.html">AffairsSubscription</a>
  
    <li><a href="../ApplicationHelper.html">ApplicationHelper</a>
  
    <li><a href="../BackgroundTask.html">BackgroundTask</a>
  
    <li><a href="../BankImportHistoriesDatatable.html">BankImportHistoriesDatatable</a>
  
    <li><a href="../BankImportHistory.html">BankImportHistory</a>
  
    <li><a href="../ColorizedOutput.html">ColorizedOutput</a>
  
    <li><a href="../Comment.html">Comment</a>
  
    <li><a href="../DateValidator.html">DateValidator</a>
  
    <li><a href="../DeviseHelper.html">DeviseHelper</a>
  
    <li><a href="../DirectoryController.html">DirectoryController</a>
  
    <li><a href="../EmploymentContract.html">EmploymentContract</a>
  
    <li><a href="../FormatValidations.html">FormatValidations</a>
  
    <li><a href="../FullNameValidator.html">FullNameValidator</a>
  
    <li><a href="../IntervalValidator.html">IntervalValidator</a>
  
    <li><a href="../Invoice.html">Invoice</a>
  
    <li><a href="../InvoiceTemplate.html">InvoiceTemplate</a>
  
    <li><a href="../InvoicesDatatable.html">InvoicesDatatable</a>
  
    <li><a href="../Job.html">Job</a>
  
    <li><a href="../Language.html">Language</a>
  
    <li><a href="../LanguageHelper.html">LanguageHelper</a>
  
    <li><a href="../LdapAttribute.html">LdapAttribute</a>
  
    <li><a href="../Location.html">Location</a>
  
    <li><a href="../LocationsDatatable.html">LocationsDatatable</a>
  
    <li><a href="../MoneyComposer.html">MoneyComposer</a>
  
    <li><a href="../Object.html">Object</a>
  
    <li><a href="../PeopleCommunicationLanguage.html">PeopleCommunicationLanguage</a>
  
    <li><a href="../PeopleController.html">PeopleController</a>
  
    <li><a href="../PeopleDatatable.html">PeopleDatatable</a>
  
    <li><a href="../PeoplePrivateTag.html">PeoplePrivateTag</a>
  
    <li><a href="../PeoplePublicTag.html">PeoplePublicTag</a>
  
    <li><a href="../PeopleRole.html">PeopleRole</a>
  
    <li><a href="../Permission.html">Permission</a>
  
    <li><a href="../PermissionsList.html">PermissionsList</a>
  
    <li><a href="../Person.html">Person</a>
  
    <li><a href="../PersonMailer.html">PersonMailer</a>
  
    <li><a href="../PersonRelationsParser.html">PersonRelationsParser</a>
  
    <li><a href="../PhoneValidator.html">PhoneValidator</a>
  
    <li><a href="../PointsToModelValidator.html">PointsToModelValidator</a>
  
    <li><a href="../PresenceOfIdentifierValidator.html">PresenceOfIdentifierValidator</a>
  
    <li><a href="../PrivateTag.html">PrivateTag</a>
  
    <li><a href="../PublicTag.html">PublicTag</a>
  
    <li><a href="../QueryPreset.html">QueryPreset</a>
  
    <li><a href="../RakeUtils.html">RakeUtils</a>
  
    <li><a href="../Receipt.html">Receipt</a>
  
    <li><a href="../ReceiptsDatatable.html">ReceiptsDatatable</a>
  
    <li><a href="../Reflection.html">Reflection</a>
  
    <li><a href="../Role.html">Role</a>
  
    <li><a href="../SalariesController.html">SalariesController</a>
  
    <li><a href="../SearchAttribute.html">SearchAttribute</a>
  
    <li><a href="../SeedHelper.html">SeedHelper</a>
  
    <li><a href="../Setting.html">Setting</a>
  
    <li><a href="../SettingsController.html">SettingsController</a>
  
    <li><a href="../Subscription.html">Subscription</a>
  
    <li><a href="../SubscriptionValue.html">SubscriptionValue</a>
  
    <li><a href="../SubscriptionsDatatable.html">SubscriptionsDatatable</a>
  
    <li><a href="../Task.html">Task</a>
  
    <li><a href="../TaskPreset.html">TaskPreset</a>
  
    <li><a href="../TaskType.html">TaskType</a>
  
    <li><a href="../TranslationAptitude.html">TranslationAptitude</a>
  
  </ul>
</nav>

  </div>
</nav>

<div id="documentation">
  <h1 class="class">class Settings::LanguagesController</h1>

  <div id="description" class="description">
    
<p>CIRCL <a href="../Directory.html">Directory</a> Copyright (C) 2011 Complex
IT sàrl</p>

<p>This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your
option) any later version.</p>

<p>This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public
License for more details.</p>

<p>You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see &lt;<a
href="http://www.gnu.org/licenses/">www.gnu.org/licenses/</a>&gt;.</p>

  </div><!-- description -->

  
  
  
  <section id="5Buntitled-5D" class="documentation-section">
    

    

    

    

    <!-- Methods -->
    
     <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
      <h3 class="section-header">Public Instance Methods</h3>

    
      <div id="method-i-create" class="method-detail ">
        
        <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/settings/languages_controller.rb, line 37</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">create</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">@language</span>.<span class="ruby-identifier">save</span>
      <span class="ruby-identifier">format</span>.<span class="ruby-identifier">json</span>  { <span class="ruby-identifier">render</span> <span class="ruby-value">:json</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@language</span> }
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">format</span>.<span class="ruby-identifier">json</span>  { <span class="ruby-identifier">render</span> <span class="ruby-value">:json</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@language</span>.<span class="ruby-identifier">errors</span>, <span class="ruby-value">:status</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">:unprocessable_entity</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="method-i-destroy" class="method-detail ">
        
        <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/settings/languages_controller.rb, line 63</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">destroy</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">@language</span>.<span class="ruby-identifier">destroy</span>
      <span class="ruby-identifier">format</span>.<span class="ruby-identifier">json</span>  { <span class="ruby-identifier">render</span> <span class="ruby-value">:json</span> =<span class="ruby-operator">&gt;</span> {} }
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">format</span>.<span class="ruby-identifier">json</span>  { <span class="ruby-identifier">render</span> <span class="ruby-value">:json</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@language</span>.<span class="ruby-identifier">errors</span>, <span class="ruby-value">:status</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">:unprocessable_entity</span> }
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- destroy-source -->
          
        </div>

        

        
      </div><!-- destroy-method -->

    
      <div id="method-i-edit" class="method-detail ">
        
        <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/settings/languages_controller.rb, line 47</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">edit</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-identifier">format</span>.<span class="ruby-identifier">json</span>  { <span class="ruby-identifier">render</span> <span class="ruby-value">:json</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@language</span> }
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- edit-source -->
          
        </div>

        

        
      </div><!-- edit-method -->

    
      <div id="method-i-index" class="method-detail ">
        
        <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/settings/languages_controller.rb, line 27</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">index</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-identifier">format</span>.<span class="ruby-identifier">json</span> { <span class="ruby-identifier">render</span> <span class="ruby-value">:json</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@languages</span> }
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- index-source -->
          
        </div>

        

        
      </div><!-- index-method -->

    
      <div id="method-i-show" class="method-detail ">
        
        <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/settings/languages_controller.rb, line 33</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">show</span>
  <span class="ruby-identifier">edit</span>
<span class="ruby-keyword">end</span></pre>
          </div><!-- show-source -->
          
        </div>

        

        
      </div><!-- show-method -->

    
      <div id="method-i-update" class="method-detail ">
        
        <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/settings/languages_controller.rb, line 53</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">update</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">@language</span>.<span class="ruby-identifier">update_attributes</span>(<span class="ruby-identifier">params</span>[<span class="ruby-value">:language</span>])
      <span class="ruby-identifier">format</span>.<span class="ruby-identifier">json</span>  { <span class="ruby-identifier">render</span> <span class="ruby-value">:json</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@language</span> }
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">format</span>.<span class="ruby-identifier">json</span>  { <span class="ruby-identifier">render</span> <span class="ruby-value">:json</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@language</span>.<span class="ruby-identifier">errors</span>, <span class="ruby-value">:status</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">:unprocessable_entity</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 -->

    
    </section><!-- public-instance-method-details -->
  
  </section><!-- 5Buntitled-5D -->

</div><!-- documentation -->


<footer id="validator-badges">
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
  <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.2.
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
</footer>

