Skip to content

Instantly share code, notes, and snippets.

@sipple
Created November 4, 2014 14:16
Show Gist options
  • Save sipple/de005e54878872bcaf44 to your computer and use it in GitHub Desktop.
Save sipple/de005e54878872bcaf44 to your computer and use it in GitHub Desktop.
class ErrorsController < ApplicationController
def index
@errors = Error.all
end
def show
@error = Error.find(params[:id])
respond_to do |format|
format.js { #render partial}
format.html {#render action?}
end
end
end
# Jquery get ajax with replacing html (it's down the page a bit) http://api.jquery.com/jquery.get/
# Working with javascript in rails: http://edgeguides.rubyonrails.org/working_with_javascript_in_rails.html
# Partials and Ajax: https://coderwall.com/p/kqb3xq/rails-4-how-to-partials-ajax-dead-easy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment