This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule EctoTest.Repo do | |
use Ecto.Repo, otp_app: :ecto_test | |
import Ecto.Query | |
def find_or_create_by(queryable, attrs) do | |
q = Enum.reduce(attrs, queryable, fn | |
{field, val}, query -> | |
query |> where([x], field(x, ^field) == ^val) | |
_, query -> query |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = (grunt) -> | |
timestamp = Date.now().toString | |
gitSha ='<%= gitinfo.local.branch.current.shortSHA %>' | |
grunt.initConfig | |
env: grunt.file.readJSON '.env.json' | |
replace: | |
prod: | |
src: ['dist/*.html'] |