Fueling Curiosity, One Insight at a Time

At Codemancers, we believe every day is an opportunity to grow. This section is where our team shares bite-sized discoveries, technical breakthroughs and fascinating nuggets of wisdom we've stumbled upon in our work.

Jun 26, 2018
We can leverage structs in ruby to encapsulate and hold internal class data into a struct object. Since struct saves us from writing attr_accessor methods or initializer method, we can easily leverage it when in need of a temporary data structure and need to have the data grouped.
akshay
akshay
Jun 26, 2018
If you are using materialize, you need to initialize the select element with material_select(). Otherwise the select box will not get rendered.
kamal
kamal
Jun 25, 2018
Elixir and Erlang has a limit on the number of atoms that can be created. We can view the atom limit using :erlang.system_info(:atom_limit). Atom's text value is stored in the atom table and this is not garbage collected. This explains why user inputs to phoenix routes are to be matched with strings rather than atoms.
akshay
akshay
Jun 20, 2018
https://makandracards.com/makandra/5365-git-diff-staged-changes especially git diff --cached master is very useful,
1. if you do not like to look at web-ui for diff and
2. has a quite a bit code which you dont want to stage atm.
mrinmoy
mrinmoy
Jun 20, 2018
rubocop -a can autocorrect many kinds of issues.
kamal
kamal
Jun 19, 2018
ActiveRecord update_all does not touch updated_at
mrinmoy
mrinmoy
Jun 19, 2018
byebug
kamal
kamal
Jun 18, 2018
yuva
Yuva
Co-founder
Jun 16, 2018
If one wants to run iex without starting any applications iex -S mix run --no-start is very handy
yuva
Yuva
Co-founder
Jun 14, 2018
For models A and B, if A has_one B, then A.new.b.build wont work. You have to say A.new.build_b.
kamal
kamal

Showing 64 to 66 of 79 results

Ready to Build Something Amazing?

Codemancers can bring your vision to life and help you achieve your goals