Created
August 2, 2011 02:24
-
-
Save t2/1119465 to your computer and use it in GitHub Desktop.
not redirecting after destroy...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def destroy | |
Part.find(params[:id]).destroy | |
flash[:success] = "Part removed." | |
respond_to do |format| | |
format.html { redirect_to root_url } | |
format.js { redirect_to root_url } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started DELETE "/parts/26" for 127.0.0.1 at 2011-08-01 21:36:03 -0500 | |
Processing by PartsController#destroy as JS | |
Parameters: {"id"=>"26"} | |
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 | |
Snippet Load (0.1ms) SELECT "parts".* FROM "parts" WHERE "parts"."id" = ? LIMIT 1 [["id", "26"]] | |
Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."snippet_id" = 26 | |
SQL (0.3ms) DELETE FROM "parts" WHERE "parts"."id" = ? [["id", 26]] | |
Tag Load (0.1ms) SELECT "tags".* FROM "tags" INNER JOIN "parts_tags" ON "tags"."id" = "parts_tags"."tag_id" WHERE "parts_tags"."part_id" = 26 | |
Redirected to http://localhost:3000/ | |
Completed 302 Found in 251ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment