Gotcha: Request specYou may have faced this issue where { key: false } was treated as { “key”: “false” } when writing request specs in rails application development. Request params need to be passed as json along with content-type header in order for the Rails API to ca...Dec 17, 2025 · 1 min readtenzinchemi.in
Ruby |= pipe assignment operatorirb(main):021> arr = [3] => [3] irb(main):022> arr |= [3] => [3] irb(main):023> arr |= [3, 2] => [3, 2] irb(main):024> arr |= [3, 2] => [3, 2]Dec 11, 2025 · 1 min readtenzinchemi.in
Remove Nested module constant in rubyYou might have seen this solution. Object.send(:remove_const, :ExampleClass) But what if you want to remove namespaced classes in Ruby. You can use the same method, but instead of Object use the parent module where your class is nested. module App ...Oct 18, 2023 · 1 min readtenzinchemi.in
Polygon's interior and exterior angleA polygon always has an exterior angle sum to 360 no matter the number of sides or their width. A triangle has an exterior angle sum equal to 360 A square has an exterior angle sum equal to 360 A pentagon has an exterior angle sum equal to 360 Quadri...Sep 22, 2023 · 1 min readtenzinchemi.in
Parabolas wrapped in equationy = a(x-h)^2 + k If there's a parabola. You can find and tweak it with these parameters 'a' defines whether parabola is facing upward of downward 'h' defines horizontal position of the vertex of parabola. 'k' defines the narrowness of parabola. ...Sep 20, 2023 · 1 min readtenzinchemi.in