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.
Sep 10, 2018
rails 5 has config.action_view.automatically_disable_submit_tag set to true by default
Mrinmoy
Sep 6, 2018
If you have trouble booting after a routine update, just select your main hard drive as the startup disk and it will boot normally. More info here: https://jeroenmols.com/blog/2017/12/26/macosupdate/
Kamal
Aug 31, 2018
accessing a deep nested object in javascript made easy https://github.com/facebookincubator/idx
Harshwardhan
Aug 30, 2018
Rails ActionController provides
:stale?
and :fresh_when
methods which can be use to set HTTP_IF_NONE_MATCH
and HTTP_IF_MODIFIED_SINCE
headers on the browser. This helps the client to check whether the page has been modified. Response freshness is checked by matching Last-Modified
and ETag
from the server against the client request's HTTP_IF_MODIFIED_SINCE
and HTTP_IF_NONE_MATCH
headers. If it matches, then the server responds with 304 (“not modified”) status code. This will make the client to make use of cached copy of the page - thus saving us from the time spent in generating the response.Akshay
Aug 28, 2018
rspec has a
--bisect
flag that helps to chase down order-dependent test failures. It will figure out the minimum number of tests when run in order will produce the test failure.Kamal
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
Reference: https://guides.rubyonrails.org/layouts_and_rendering.html#local-variables
apple
, then counter variable is called apple_counter
.Reference: https://guides.rubyonrails.org/layouts_and_rendering.html#local-variables
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
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
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
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
Showing 64 to 66 of 82 results
Ready to Build Something Amazing?
Codemancers can bring your vision to life and help you achieve your goals
- Address
2nd Floor, Zee Plaza,
No. 1678, 27th Main Rd,
Sector 2, HSR Layout,
Bengaluru, Karnataka 560102 - Contact
hello@codemancers.com
+91-9731601276