UNA Workshop
By: Jay Hayes https://iamvery.com https://twitter.com/iamvery
You're about to build a chat room. Cool!
-
Make the
Topics
component display topics dynamically by injecting data as a property.
.ipynb_checkpoints/ | |
node_modules/ |
defmodule Power do | |
use Bitwise | |
def find(i) when i > 0 do | |
find(i, 1) | |
end | |
def find(i, p) when p < i do | |
find(i, p <<< 2) | |
end |
module ServiceOne | |
def helper_one | |
puts "one" | |
end | |
end | |
module ServiceTwo | |
def helper_two | |
puts "two" | |
end |
diff --git a/lib/money/money/arithmetic.rb b/lib/money/money/arithmetic.rb | |
index 38bc94e..19d6b79 100644 | |
--- a/lib/money/money/arithmetic.rb | |
+++ b/lib/money/money/arithmetic.rb | |
@@ -125,10 +125,10 @@ class Money | |
[:+, :-].each do |op| | |
define_method(op) do |other| | |
unless other.is_a?(Money) | |
- if other.zero? | |
+ if other && other.zero? |
defmodule PantsWeb.ChangesetView do | |
use PantsWeb, :view | |
@doc """ | |
Traverses and translates changeset errors. | |
See `Ecto.Changeset.traverse_errors/2` and | |
`PantsWeb.ErrorHelpers.translate_error/1` for more details. | |
""" | |
def translate_errors(changeset) do |
diff --git a/lib/pants_web/endpoint.ex b/lib/pants_web/endpoint.ex | |
index c24852a..a8ae2cf 100644 | |
--- a/lib/pants_web/endpoint.ex | |
+++ b/lib/pants_web/endpoint.ex | |
@@ -45,7 +45,19 @@ defmodule PantsWeb.Endpoint do | |
signing_salt: "HqMY6W5G" | |
) | |
- plug(PantsWeb.Router) | |
+ def version(conn, []) do |
quote do: {:a, :b, :c} | |
value = {:a, :b, :c} | |
Macro.escape(value) | |
quote do: value | |
value = {:a, :b, :c} | |
quote do: unquote(value) |
{ | |
"name": "frontier", | |
"version": "0.1.0", | |
"private": true, | |
"devDependencies": { | |
"jest-expo": "~19.0.0", | |
"react-dom": "16.0.0-alpha.12", | |
"react-native-dotenv": "^0.1.0", | |
"react-native-scripts": "1.1.0", | |
"react-test-renderer": "16.0.0-alpha.12" |
By: Jay Hayes https://iamvery.com https://twitter.com/iamvery
You're about to build a chat room. Cool!
Make the Topics
component display topics dynamically by injecting data as a property.