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.

Aug 28, 2018
when rendering rails partial with collection, rails provides a counter variable which can be accessed by title of the partial followed _counter. For eg: if the partial is called apple, then counter variable is called apple_counter.
Reference: https://guides.rubyonrails.org/layouts_and_rendering.html#local-variables
manu
Manu
Aug 10, 2018
Docker images for rails will be around 500Mb on Alpine linux. Sounds a lot. Whereas Alpine bases phoenix/elixir images are typically under 100Mb
yuva
Yuva
Co-founder
Aug 7, 2018
as of webpack 4.x you can pass function for output.filename which will get the input chunk as it's param and return a string
harshwardhan
Harshwardhan
Aug 6, 2018
"Don't add ! to your destructive (receiver-changing) methods' names,
unless you consider the changing to be "dangerous" and you have a
"non-dangerous" equivalent method without the !" http://davidablack.net/dablog.html#2007/8/15/bang-methods-or-danger-will-rubyist
akshay
Akshay
Aug 6, 2018
Use DISABLE_DATABASE_ENVIRONMENT_CHECK env variable to get rid of those crazy migrations check introduced by Rails 5!
yuva
Yuva
Co-founder
Aug 2, 2018
we can attach methods to an individual instance in ruby https://www.dropbox.com/s/4gpm3r9r9qun35f/Screen%20Shot%202018-08-02%20at%2011.10.22%20PM.png?dl=0
prototypes :p
mrinmoy
Mrinmoy
Aug 2, 2018
~/.local/share/trash
mrinmoy
Mrinmoy
Aug 1, 2018
form.submit() won't run the HTML5 validations. if you want to programatically run HTML5 validation use form.checkValidity() and form.reportValidity() EG: https://jsbin.com/huqana
revath
Revath
Jul 26, 2018
The EXPLAIN statement provides information about how MySQL executes statements i.e MySQL explains how it would process the statement, including information about how tables are joined and in which order
manu
Manu

Showing 63 to 65 of 80 results

Ready to Build Something Amazing?

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