def update

      @admin = Admin.find(params[:id])

      @admin.deal_with_cover params


      respond_to do |format|

        admin_passed = 
          if params[:admin][:password].blank?
            @admin.update_without_password(administrator_params)
          else
            @admin.update_attributes(administrator_params)
          end

        if admin_passed
          clear_cache
          profile_images(params, @admin)
          format.html { redirect_to edit_admin_administrator_path(@admin), notice: I18n.t("controllers.admin.administrators.update.flash.success") }
        else
          @action = 'update'
          format.html {
            # add breadcrumb and set title
            add_breadcrumb I18n.t("controllers.admin.administrators.edit.breadcrumb")
            flash[:error] = I18n.t('generic.validation.no_passed')
            render action: "edit"
          }
        end

      end

    end
def update

      @admin = Admin.find(params[:id])

      @admin.deal_with_cover params


      respond_to do |format|

        admin_passed = 
          if params[:admin][:password].blank?
            @admin.update_without_password(administrator_params)
          else
            @admin.update_attributes(administrator_params)
          end

        if admin_passed
          clear_cache
          profile_images(params, @admin)
          format.html { redirect_to edit_admin_administrator_path(@admin), notice: I18n.t("controllers.admin.administrators.update.flash.success") }
        else
          @action = 'update'
          format.html {
            # add breadcrumb and set title
            add_breadcrumb I18n.t("controllers.admin.administrators.edit.breadcrumb")
            flash[:error] = I18n.t('generic.validation.no_passed')
            render action: "edit"
          }
        end

      end

    end
update the admins object