I hereby claim:
- I am mcollie1 on github.
- I am mcollier (https://keybase.io/mcollier) on keybase.
- I have a public key whose fingerprint is 9DA3 3224 F833 5B81 2629 C023 2CEA 61CB 8F57 B2DF
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class ApiController < ActionController::Base | |
skip_before_action :verify_authenticity_token | |
before_filter :cors_preflight_check | |
after_filter :cors_set_access_control_headers | |
# necessary in all controllers that will respond with JSON | |
respond_to :json | |
def cors_set_access_control_headers | |
headers['Access-Control-Allow-Origin'] = '*' |
<script> | |
(function (){ | |
// track a client-side event using the Blocmetrics analytics service | |
var _bm_event = { | |
name: "Topic Views", | |
topic_name: "<%= @topic.name %>", | |
created_at: "<%= @topic.created_at %>" | |
} | |
var _bm_request = new XMLHttpRequest(); |
<h1><%= @topic.name %></h1> | |
<% if policy(@topic).update? %> | |
<%= link_to "Edit Topic", edit_topic_path, class: 'btn btn-success' %> | |
<% end %> | |
<div class="row"> | |
<div class="col-md-8"> | |
<p class="lead"><%= @topic.description %></p> | |
<%= render @posts %> |
2014-03-17T22:30:27.285143+00:00 heroku[run.6151]: State changed from up to complete | |
2014-03-17T22:31:38+00:00 heroku[slug-compiler]: Slug compilation started | |
2014-03-17T22:32:08+00:00 heroku[slug-compiler]: Slug compilation finished | |
2014-03-17T22:32:08.586287+00:00 heroku[api]: Deploy 9ac5562 by [email protected] | |
2014-03-17T22:32:08.586379+00:00 heroku[api]: Release v26 created by [email protected] | |
2014-03-17T22:32:09.027390+00:00 heroku[web.1]: State changed from crashed to starting | |
2014-03-17T22:32:14.120886+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 35230 -e production` | |
2014-03-17T22:32:15.296596+00:00 app[web.1]: bash: bin/rails: No such file or directory | |
2014-03-17T22:32:17.132201+00:00 heroku[web.1]: Process exited with status 127 | |
2014-03-17T22:32:17.147489+00:00 heroku[web.1]: State changed from starting to crashed |
require 'faker' | |
# Create 15 topics | |
topics =[] | |
15.times do | |
topics << Topic.create( | |
name: Faker::Lorem.sentence, | |
description: Faker::Lorem.paragraph | |
) | |
end |
require 'faker' | |
# Create 15 topics | |
topics =[] | |
15.times do | |
topics << Topic.create( | |
name: Faker::Lorem.sentence, | |
description: Faker::Lorem.paragraph | |
) | |
end |