Mar 8, 2021Nested Resources In Rails.I came across with a challenge to build nested route in rails, and I believe that this post can help other junior like myself. The challenge was about to set up a nested route for 3 controllers where: Dog is child of Owner and Meal is a child of Dog…Ruby On Rails Development3 min read
Jan 17, 2021React Redux Redux-thunk essentialReact Redux Redux-thunk essential This blog post will explain the basic of understanding React Redux concept. In order to avoid passing props down to components in React, Redux is very helpful to manage the states. It is similar to a cycle. Only 3 steps to master. You must have a…Front End Development2 min read
Nov 11, 2020Ruby Enumerables: ‘any’, ‘all’, ‘none’, and ‘find’Ruby offers various enumerables on collections that check for validity of the objects within it. Consider the following example: The any? method returns true if the block ever returns a value other than false or nil for any element passed to it:Ruby2 min readRuby Enumerables: ‘any’, ‘all’, ‘none’, and ‘find’Ruby offers various enumerables on collections that check for validity of the objects within it.Consider the following example:The any? method returns true if the block ever returns a value other than false or nil for any element passed to it:----
Nov 4, 2020Rub Array Essentialarr = [9, 5, 1, 2, 3, 4, 0, -1] access index inclusive and exclusive rangeRuby3 min readRub Array Essentialarr = [9, 5, 1, 2, 3, 4, 0, -1]access indexinclusive and exclusive range----
Oct 26, 2020For each, Map, Collect, Select,Find_all, Find, Reduce in RubyFOR EACH The each iterator returns all the elements of an array or a hash.Executes code for each element in collection. Here, collection could be an array or a ruby hash. It’s does not alter the original argument Syntax MAP Map is a Ruby method that you can use with Arrays, Hashes &…Rub4 min read
Oct 19, 2020Active Record BasicsActive Record Active Record is the M in MVC — the model — which is the layer of the system responsible for representing business data and logic. Active Record facilitates the creation and use of business objects whose data requires persistent storage to a database. …Rails 64 min read
Oct 12, 2020The Component LifecycleEach component in React has a lifecycle which you can monitor and manipulate during its three main phases. The three phases are: Mounting, Updating, and Unmounting. Each component has several “lifecycle methods” that you can override to run code at particular times in the process. You can use this lifecycle…Java Script5 min read
Oct 5, 2020React FormsHandling forms is about how you handle the data when it changes value or gets submitted. In HTML, form data is usually handled by the DOM. In React, form data is usually handled by the components. When the data is handled by the components, all the data is stored in…Java Script4 min read
Sep 28, 2020React StateReact components has a built-in state object. The state object is where you store property values that belongs to the component. When the state object changes, the component re-renders. Creating the state Object The state object is initialized in the constructor: Example: Specify the state object in the constructor method: The state object can contain…Java Script3 min read
Sep 21, 2020React EventsReact is a JavaScript library for building user interfaces. React is used to build single page applications. React allows us to create reusable UI components. Just like HTML, React can perform actions based on user events. React has the same events as HTML: click, change, mouseover etc. Adding Events Handling events with…Java Script3 min read