-
-
Save dzjin/9662f04f97b8b3eea62c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 draft | |
| @params = params[:tags] | |
| respond_to do |format| | |
| format.js | |
| end | |
| end |
This file contains hidden or 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
| console.log("<%=j @params %>") |
This file contains hidden or 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 POST "/tags/draft" for 71.72.70.219 at 2014-04-30 01:42:46 +0000 | |
| Processing by TagsController#draft as */* | |
| Parameters: {"tags"=>"test,ifthis works"} | |
| Rendered tags/draft.js.erb (0.8ms) | |
| Completed 500 Internal Server Error in 5ms |
This file contains hidden or 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
| $('#submit-draft').click(function(){ | |
| event.preventDefault(); | |
| var draft_tags = $('.new-draft input').val(); | |
| $.post("<%=j draft_tag_path() %>", { tags: draft_tags }); | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment