def update
      param_key = ActiveModel::Naming.param_key(@content)

      respond_to do |format|
        if @content.update_attributes(params[param_key])
          format.json { render json: @content }
        else
          format.json { render json: @content.errors, status: :unprocessable_entity }
        end
      end
    end
def update
      param_key = ActiveModel::Naming.param_key(@content)

      respond_to do |format|
        if @content.update_attributes(params[param_key])
          format.json { render json: @content }
        else
          format.json { render json: @content.errors, status: :unprocessable_entity }
        end
      end
    end
PUT /contents/1
 PUT /contents/1.json