I hereby claim:
- I am ricn on github.
- I am ricn (https://keybase.io/ricn) on keybase.
- I have a public key ASCK97GTlzSqp6Fyip_LjcAVUM3EitY6wqccCTVAR1tkbAo
To claim this, I am signing this object:
<script defer type="text/javascript" src="/assets/fbai.js"> |
I hereby claim:
To claim this, I am signing this object:
var Vue = require('vue') | |
new Vue({ | |
el: '#app', | |
data: { | |
message: 'Hello Vue.js!' | |
} | |
}); |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
=PROGRESS REPORT==== 9-Nov-2015::22:39:02 === | |
supervisor: {local,sasl_safe_sup} | |
started: [{pid,<0.175.0>}, | |
{id,alarm_handler}, | |
{mfargs,{alarm_handler,start_link,[]}}, | |
{restart_type,permanent}, | |
{shutdown,2000}, | |
{child_type,worker}] | |
=PROGRESS REPORT==== 9-Nov-2015::22:39:02 === |
controller code: | |
def toggle_star(conn, %{"id" => id}) do | |
bookmark = Repo.one(Bookmark.by_id_and_user_id(id, user_id(conn))) | |
if bookmark do | |
Bookmark.changeset(bookmark) | |
|> put_change(:starred, !bookmark.starred) | |
|> Repo.update! | |
render(conn, "toggle_star.json", starred: !bookmark.starred) | |
end |
resources :photos do | |
member do | |
get 'preview' | |
end | |
end |
Test error: | |
3) test deletes chosen resource (Bookmarks.BookmarkControllerTest) | |
test/controllers/bookmark_controller_test.exs:66 | |
** (ArgumentError) argument error | |
stacktrace: | |
:erlang.apply(695, :id, []) | |
test/controllers/bookmark_controller_test.exs:68 | |
Test code: |
defmodule Bookmarks.Bookmark do | |
use Bookmarks.Web, :model | |
schema "bookmarks" do | |
field :href, :string | |
field :title, :string | |
field :description, :string | |
timestamps | |
end |