Skip to main content
Gravatar
How to count comments like reddit (infinite nested model) ?
Ruby Solved • Asked by Robert Hopman
Hey Chris, I have an `item` model which gets submitted. With `has_many :comments, as: :commentable, dependent: :destroy` then in the `comment` model I have `belongs_to :commentable, pol...

Gravatar
Ruby on Rails or Node.JS, who is the leader of 2017?
Ruby • Asked by alexblack
Finally, [Ruby on Rails vs Node.js](https://artjoker.net/blog/nodejs-vs-ruby-on-rails/) – who seems to be really better? Frankly, Ruby On Rails is still a popular framework and loved by a lot of de...

Gravatar
caller
Ruby • Asked by roberto santelices
I have trouble solving the following excercise, i was wondering if there is any way in ruby where i can get which method called which i think caller but i havent figured out yet ``` require_re...

Gravatar
Chat Using Action Cable part 3 - Chatroom and ChatroomUsers Association
Ruby • Asked by RicePad
I've been playing around and trying to implement a chat such as slack as shown on Chris's screencast. On Chatroom index I'm able to Show, Edit, Join, and Leave. However, when I clicked on Show e...

Gravatar
How do I add the amount stored in my database to Braintree::Transaction.Sale?
Ruby • Asked by RicePad
Hi all, I'm new to this community and also new to Ruby on Rails. I recently watched the Braintree integration screencast by Chris and I've been playing around with its Sand box integration. I ...

Gravatar
Optimizing Queries in Service Objects
Ruby Solved • Asked by Jacob Warren
I'm currently building an app and using namespaced service objects containing a single call method in each class. Below is an actual method (I'm aware the ABC size is too large, I'm wanting to g...

Gravatar
Regexp for prices or how to detect price in a smart way
Ruby • Asked by Jack
Any regexp experts here? I have the following situation: - get an invoice - scan it for prices and save the highest number - success 🍾 I do this with a `.scan(/…/)`. Pretty fast in Ruby. ✨ ...

Gravatar
Proper location for null objects
Ruby Solved • Asked by Alex Musayev
I've recently watched couple of screencasts on using Null Object Pattern: https://www.rubytapas.com/2017/01/31/two-screencasts-two-ways-eradicate-ruby-nil-values It was a good reminder about a ques...

Gravatar
How can I subscribe a user when creating a new project?
Ruby Solved • Asked by Lauro Silva
**How can I subscribe a user when creating a new project?** I'm having a hard time on the `create` method. Currently this is my code: ### Projects controller ```ruby def create ...

Gravatar
Error running Rails with Ruby 2.4.0
Ruby • Asked by Menj Villalobos
``` [Menj]~/RubymineProjects/myapp2$ rails s /Users/Menj/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprec...