Skip to main content
How can I setup Vim for rails development on Ubuntu?!
General Solved • Asked by Muhammad
Hey guys, Lately I have been trying to switch to Vim but I couldn't because It's kinda complicated. Most of the dotfiles I found were built to setup on a Mac so I'm curious if anyone here is workin...

new myapp
Rails Solved • Asked by Devkit
Hello! Help me please! I enter "rails new myapp", the terminal stops at this: > "The dependency tzinfo-data (> = 0) will be unused by any of the platforms Bundler is installing for .bunler is ...

Okay I subscribed to learn Rails.. but where do I start?
General Solved • Asked by Shoaib Ali Cherangi House
Okay, I might be coming off like a total noob (and I am one by all means when it comes to Rails) but I really need some clarity on how to get strated with learning Rails from the Episodes available...

How to send different Plan ID's to Stripe?
Rails Solved • Asked by Adrian DeGus
I worked through the Subscriptions with Stripe video and got everything working fine, with a single Plan ID. Now I'm trying to modify it to work with multiple Plan ID's to give my users payment ...

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...

How do I save the user_id by adding the mail?
Rails Solved • Asked by Nicolás Bobb
How do I save the user_id by adding the mail? For the relationship, you have to save the user_id, but to be more dynamic for the user, I want to the users search other users by the email and rai...

Do I need rails-ujs and jquery_ujs?
Javascript Solved • Asked by Nick McNeany
I'm bulding a rails 5.1.x app so no jQuery, but I'm usining Bootstrap so I added it in. I was adding in `//= require jquery` and `//= require jquery_ujs`, then noticed that rails 5.1 now ships w...

How is it done to pass default values in the controller?
Rails Solved • Asked by Nicolás Bobb
Some values by default and others by strong parameters from the views

Creating usergroups
Rails Solved • Asked by Trenton Tyler
I am creating an application where users can belong to groups and those groups can belong to a map. In order to link a user and group together I created a model called usergroup. I listed the m...

Looking for advice on how to setup a relationship.
Databases Solved • Asked by Morgan
I'm trying to figure out the best way to setup relationships between models which allows users to publish saved content from multiple models. **ExampIe:** I have a **Post** model which allows...

How do I create an attendance form for student attendance?
General Solved • Asked by Ernesto Gutierrez
I've been racking my brain and just need to ask for help on the creating this function in my app. **Scope:** simple app for non-profit for tracking student attendance What I've done: * created...

How to create many subcategories in rails?
Rails Solved • Asked by Nicolás Bobb
Without using any gems how do I do this in rails? I see the gem Ancestry ( ``` Main Category Sub Category Sub Category Sub-sub Category Main Cate...

Searchick filter with scope
Gems / Libraries Solved • Asked by Christophe Estanol
Has anybody used searchkick with a scoped model? I have an `Article` model with `scope :published, ->{ where(status: "Published") }`. So In my `ArticleController` I did the following: ``` qu...

[Newbie] How can i keep data while "add field" or "change fieldname" in model?
Rails Solved • Asked by Simple is Best
sorry my english. if my user model have ``` t.string :name t.string :age ``` and data ``` 1 : John / 34 2 : Tom / 25 ``` if I want to add a field and change field name ``` t.string...

Hey Guys, What is the best way to add tags and categories to a rails blog application?!
Rails Solved • Asked by Muhammad
I'm trying to build a blog & portfolio app using rails and I want to add tags to make the content organized, I'm trying to add acts_as_taggable_on but I'm struggling with it so I thought I might as...

How do I update value from one scaffold with the value of another scaffold?
Databases Solved • Asked by Tatiane Stivelman
I'm doing a project that contains a stock, I first created the stock scaffold like this: ``` rails generate scaffold stock name:string amount:float kind:string ``` And then a stock_flow sca...

How do I save a save a has_many association?
Rails Solved • Asked by Morgan
I have setup a service that parses and saves the result of an external API which all works great, however, I can't work out how to save the array of images that need to be saved in a has_many relat...

How do i save the initial time a boolean went from false to true
Rails Solved • Asked by Dim Dir
I have a boolean column in my table and a datetime related to it. I want to be able to track down when the boolean initially turns true. In the model I have tried def example if boolean_fiel...

HTTP, Faraday, Typhoeus or something else?
Gems / Libraries Solved • Asked by Morgan
I have an external JSON API that I need to parse and save and was wondering if anyone had any suggestions on what to use? I found tons of info on building a rails API but very little on consumin...

How to migrate from Heroku to Digital Ocean
Servers Solved • Asked by Francisco Quinones
Chris, I'm thinking of moving to digital Ocean from Heroku but my knowledge on this topic is cloudy. Can you tell us about the differences between the 2 service? and benefit.