samedi 13 mai 2017

Rails How to fix Missing mobile template?

i'm trying to update the user information when on mobile but rails log show:

someone know why this happen on mobile mode?

Missing template users/update, application/update with {:locale=>[:"en"], :formats=>[:mobile], :handlers=>[:erb, :builder, :coffee]}. Searched in:

def update
    @user = User.find(params[:id])
    respond_to do |format|
      format.html do
        @states = State.all
        @cities = City.where('state_id = ?', State.first.id)
        if @user.update_attributes(params[:user])
          redirect_to(action: :edit, id: @user, only_path: true, format: :html)
          flash[:notice] = 'updated'

        else
          render :edit
        end
      end
      format.json do
        @user.update_attributes(params[:user])
        render nothing: true
      end
    end
  end

Aucun commentaire:

Enregistrer un commentaire