Top "Elixir" questions

Elixir is an open-source, dynamic, compiled, general purpose functional programming language.

How to read config variable in Phoenix / Elixir?

I'd like to set the title of my app in my/config/config.exs file: config :my, My.Endpoint, url: […

elixir phoenix-framework
How do you define constants in Elixir modules?

In Ruby, if one were defining constants in classes, they would define them using all caps. For example: class MyClass …

elixir
Is there a Phoenix equivalent to Rails Console

I'm just learning Phoenix and Elixir and I'm coming from Ruby/Rails where I work in the REPL using pry …

elixir phoenix-framework ecto iex
How to call a method dynamically in Elixir, by specifying both module and method name?

I'd like to know what exactly a method name is in elixir: array = [1,2,3] module_name = :lists method_name = :nth # this …

erlang metaprogramming elixir
In Elixir, how do you format numbers with string interpolation

I want to print out a string like IO.puts("Count: #{my_count}") But I want leading zeroes in the …

elixir
How do you pass a function as a parameter in Elixir?

How do you specify a function as a parameter to another function in Elixir? For instance, pass foo to bar …

elixir
How to build WHERE IN array clause with Ecto?

How to find posts in given List of ids? This isn't working: posts = Post |> where(id: [1, 2]) |> Repo.all …

elixir phoenix-framework ecto
In Elixir, is there any way to get a module to list its functions?

In the same way that we can get any object (or class) in Ruby to list its methods, is there …

elixir
How can we easily time function calls in elixir?

How can we easily time function calls in Elixir? Is there any hidden switch in IEx to enable this?

function timing elixir
Elixir map check if not empty and key exists

I am trying to figure out a way to check if the params hash in a Phoenix app (using Elixir) …

elixir phoenix-framework ecto