title: Change View based on Option selected in select_tag in rails
body: <p>I am trying to make a form where a user can wither post normally with their username like this - > normal</p>
  
  <pre><code>  =form_for @confession , html: {multipart: true} do |f|
      =f.label :Confess
      =f.text_area :confession , require: true
      =f.file_field :confessionimage
      =f.select (:id,options_for_select(ID))
      =f.submit 'Confess'
  </code></pre>
  
  <p>or Anonymously where their Names will be hidden and no one will know that who posted this post .. for this what I thought was I will make a user named anonymous in database and if a user select anonymous in select_form while posting they will post as an anonymous user. </p>
  
  <p>for this in my controller I want something like this and main point that I can't understand is how can the controller know what user has selected ?</p>
  
  <p>this is my controller </p>
  
  <pre><code>    def index 
         @amitian = Amitian.where(institute: current_amitian.institute) if                 amitian_signed_in?
         @confessions = Confession.where(amitian_id: @amitian.ids).order('created_at   DESC') if amitian_signed_in?
         @confession = current_amitian.confessions.build 
         @anonymous = Amitian.where(email: anonymous@anonymous.com)
         # (if anonymous selected )
         do @anonymous.confessions.build   
      end
  </code></pre>