How to write update_branch actoin?configurations.controller.rbdef create    para = configuration_params    uuid = para[:store_name] + para [:address]    para[:uuid] = Digest::MD5.hexdigest(uuid).upcase    @branch = StoreConfiguration.new(para)    respond_to do |format|      if @branch.save        format.html { redirect_to branches_configurations_url, notice: 'successfully' }      else        format.html { render action: 'new' }      end    end  end  def destroy    find_branch.destroy    redirect_to branches_configurations_url, notice: 'Delete successfully!'  end  def update_branch    result = StoreConfiguration.update(configuration_params)    if result.success?      redirect_to branches_configurations_url, notice: 'Update successfully!'    else      result.errors    end  endprivate    # Use callbacks to share common setup or constraints between actions.    def set_configuration      @configuration = StoreConfiguration.find(1)    end    # Never trust parameters from the scary internet, only allow the white list through.    def configuration_params      params.require(:store_configuration).permit(:store_name, :store_description, :email_address, :phone_number, :website_url, :address, :city, :state, :zip, :currency, :tax_rate, :fax_number, :uuid, :category)    end    def find_branch      @branch = StoreConfiguration.find(params[:id])    endedit.html.rb<%= form_for(@branch, url: { controller: 'configurations', action: 'update_branch'}, :method => :get) do |f| %>  <%= render :partial => 'template/form_errors', :object => @branch %>  <div class=panel panel-default>    <div class=panel-body>      <div class=row>        <div class=col-sm-6>          <div class=form-group>            <label>Email Address</label>            <%= f.text_field :email_address, :class => form-control, :placeholder => Email address %>          </div>        </div>        <div class=col-sm-3>          <div class=form-group>            <label>Phone Number</label>            <%= f.text_field :phone_number, :class => form-control, :placeholder => Phone number %>          </div>        </div>        <div class=col-sm-3>          <div class=form-group>            <label>Fax Number</label>            <%= f.text_field :fax_number, :class => form-control, :placeholder => Fax number %>          </div>        </div>      </div>      <div class=row>        <div class=col-sm-6>          <div class=form-group>            <label>Address</label>            <%= f.text_field :address, :class => form-control, :placeholder => Address %>          </div>        </div>        <div class=col-sm-6>          <div class=form-group>            <label>City</label>            <%= f.text_field :city, :class => form-control, :placeholder => City %>          </div>        </div>      </div>    </div>  </div>  <div class=row>    <div class=col-sm-12>      <%= link_to Update, update_branch_configurations_path %>    </div>  </div><% end %>Show Page : branch.html.erb<div class=panel panel-default>  <div class=panel-heading clearfix>    <%= link_to 'Add New Branch', new_configuration_url, class: 'btn btn-success btn-sm' %>    <div class=pull-right>    </div>  </div>  <div class=panel-body>      <table class=table table-striped table-bordered table-hover>        <thead>          <tr>            <th>No.</th>            <th>Category</th>            <th>Name</th>            <th>Phone</th>            <th>UUID</th>            <th>Actions</th>          </tr>        </thead>        <tbody>            <% @branches.each_with_index do |branch, index| %>                <tr>                    <td><%= index+1 %></td>                    <td><%= branch.category %></td>                    <td><%= branch.store_name %></td>                    <td><%= branch.phone_number %></td>                    <td><%= branch.uuid %></td>                    <td>                        <%= link_to_if can?(:edit, branch), 'Edit', edit_configuration_path(branch) %>                        <%= link_to Delete, configuration_path(branch), method: :delete %>                    </td>                </tr>            <% end %>        </tbody>       </table>    </div></div>
Please How to write update_branch action?
forums