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.
Dec 27, 2017
more info on proxy javascript objects here https://docs.microsoft.com/en-us/scripting/javascript/reference/proxy-object-javascript
harshwardhan
Dec 27, 2017
in es6 you can now proxy your object's operation like get, set etc. All you need to do it create a proxy on a object like
const proxyObj = new Proxy(initialObj, handler)
the initial object is the object that you want to create proxy for and handler object is the place where you override object's method like get and set.harshwardhan
Dec 21, 2017
about ActiveSupport::Notifications there is a railscasts on it http://railscasts.com/episodes/249-notifications-in-rails-3
mrinmoy
Dec 21, 2017
In javascript generally if you reduce an array it starts from 0th element and goes till the end but if you want to run the reduce from right to left of an array i.e. start from last element and go till the first element use
arr.reduceRight
harshwardhan
Dec 19, 2017
In order to know hierarchy of translations, print defaults here https://github.com/rails/rails/blob/v5.1.4/activemodel/lib/active_model/errors.rb#L405 and see the magic!
Yuva
Co-founder
Dec 13, 2017
flash.now
in rails, which allows you to have flash messages which does not persists across subsequent action unlike regular flash
i.e it sets a flash message which is available only to the current action and not for next. http://api.rubyonrails.org/v5.1/classes/ActionDispatch/Flash/FlashHash.html#method-i-nowmanu
Nov 30, 2017
[RealWorld](https://github.com/gothinkster/realworld) is a project that curates a list of implementations of frontends and backends in different frameworks for the same application spec . This is a great way to understand how to build non-trivial features when getting started with a new framework.
emil
Nov 30, 2017
ActiveRecord Query method - none. It returns a chainable relation with zero records.
Post.none => #
manu
Nov 28, 2017
active record inspect method is invoked to log the active record collection object to the rails console which by default limits the query by 11 but does not actually limit the query being executed.
akshay
Showing 69 to 71 of 77 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