Comments (3)
Does the $.update
command successfully change the data on the server? In that case it sounds like your controller simply isn't configured to return a value after a successful update action.
I'll take a look, but I don't know anything about inherited_resources
. You'll need to separate the json and html response code, since html will usually redirect while json should return the updated record.
from jquery.rest.
It looks like you want something like this:
class Admin::DesignersController < Admin::BaseController
respond_to :html, :json
def update
update! do |format|
format.html { redirect_to whatever_path }
format.json do
render :json => @designer
end
end
end
end
I'm basing this off of the Overwriting Actions section of the inherited_resources README.
You'll need to fill in a few blanks there, but hopefully that should point you in the right direction. I'm closing this for now since it doesn't sound like an issue with jQuery.rest
itself.
from jquery.rest.
Thanks a lot for your help, that did the trick!
The only reason why I thought it might've been a problem related to jQuery.rest was that I had a "success" response even though it didn't work. But it was not really a javascript problem after all.
from jquery.rest.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery.rest.