Add javascript tracker and give Blocmetrics the capability to receive and record events from the js tracker.

I thought 404 was for html view?

On Jul 25, 2014, at 2:51 AM, Oliver Azevedo Barnes <notifications@github.com> wrote:

> In app/controllers/events_controller.rb:
> 
> > +
> > +  def cors_set_access_control_headers
> > +    common_cors_headers
> > +  end
> > +
> > +  def common_cors_headers
> > +    headers['Access-Control-Allow-Origin'] = '*'
> > +    headers['Access-Control-Allow-Methods'] = 'POST, GET, OPTIONS'
> > +    headers['Access-Control-Allow-Headers'] = 'X-Requested-With, X-Prototype-Version, Content-Type'
> > +    headers['Access-Control-Max-Age'] = "86400"
> > +  end
> > +
> > +  def not_found
> > +    respond_to do |format|
> > +      format.html { render :file => File.join(Rails.root, 'public', '404.html') }
> > +      format.json { render :text => '{"error": "App not found."}' }
> render text: "App not found", status: 404
> 
> —
> Reply to this email directly or view it on GitHub.
>