Skip to main content
Best way to measure distance between current user's location and place location?
General • Asked by Matias Fernandez
I'm building an app similar to Yelp. The user should have a current location (taken automatically) and a chosen location (defaulted to current location). Each place should also have a location. I w...

Set up complex forms that user form objects nested within form objects?
General • Asked by Greg Cosgrove
Context: I'm working on an app for my job with strange requirements. Unfortunately, I have to maintain a data structure that's accessible to legacy CF applications that were originally designed fo...

Building a multi-location app in rails
General • Asked by Satchit Shenoy
Hi! I am trying to build a multi-location app from a client. I have tried dabbling with Apartment and other types of multitenancy but didn't receive a proper result. The app should have domai...

JRuby on Rails and Java dependency management
General • Asked by Andrei Crudu
I've been searching online for a good way to manage Java dependencies in a JRuby on Rails app. I am interested in a way to structure the initial setup. I will have to use quite a lot of machine lea...

Upgrade FedenaProject to latest Ruby application
General • Asked by Oyewole Samuel
i downloaded fedena project which was developed by Ruby 1.9, please, how can i upgrade it to last ruby (Ruby 2.1). thanks

INSERT multiple records with accepts_nested_attributes_for
General • Asked by sacko idriss
Hi evry bady. I have three models. I want a form that gives the product list, just added the amount for inclusion in ventelinges. ```produit.rb class Produit < ActiveRecord::Base has_m...

has_one association on polymorphic model
General Solved • Asked by Greg Answer
I have the following models (stripped down for simplicity) : ```ruby class Activity < ActiveRecord::Base belongs_to :trackable, polymorphic: true belongs_to :user has_one :comment, ...

How "expensive" are API calls?
General Solved • Asked by Isaac Ben Hutta
I was thinking about an SPA that has a like button. In "Liking Post" tutorial you wrote a method that checks if the current user liked the post, but in an SPA that means I will have to make a call ...

Any good tutorials on using rbenv?
General Solved • Asked by Todd Quillen
I setup my rails environment using the ubuntu installation guide found on gorails (amazingly helpful, thank you) but I'm not really sure how to use rbenv. I have a few rails apps, and I'm wonder...

Access rights and roles logic in third model ("has_many through" association)
General • Asked by Jaromír Červenka
Hello, this question is more conceptual, than technical one. Do you think that it's a good idea to handle different types of "access rights" and "roles" in third model like this? ```ruby cla...

Pundit scopes
General Solved • Asked by Dmitry Amelchenko
Hi, i have no idea how to choose best way. There are three models User, Department and Task. Each user assigned to one department (belongs to). Department has many tasks. How to write a policy or s...

How to use devise with Adminitrate?
Gems / Libraries • Asked by Oyewole Samuel
Great tuts, please how can i use this with devise? when i run rails generate administrate:install, it generate error... says admin is not a class, already have a devise called admin, also have a vi...

URL Based multi tenancy
General Solved • Asked by Oyewole Samuel
I'm new to Ruby on Rails, trying my best to catch up. for example... i've a domain and a username append to it,, how can i achieve this and also routing? sample code will be ...

Re: In-App Navbar Notifications work on page load but not page change
General Solved • Asked by Ariff Munshi
Hey Chris, Just watched and implemented the code from this screencast and it's working well. However, I realised that it only works on first page load. Subsequent pages do not run the function....

Display user
General • Asked by Nick McNeany
Hi Everyone, I'm trying to display a users profile image, along with their username in an autocomplete dropdown. The autocomplete functionality works fine, I'm just having trouble displaying ...

Elastic search & search kick incorporating dates fields and integers
General Solved • Asked by John Munyi
HI Chris, I implemented elastic search using search kick gem and all went well from search, autocomplete and suggestions when dealing with text. Now i wanna perform a similar search on tabl...

How to raise a warning message from the model
General • Asked by Sascha M.
Hi there, In my rails app I have the parent model ORDERS with SALES as a child (as nested routes). So 1 Order has_many Sales and 1 Sale belongs_to Order. In my USER model I have the column "maxd...

GoRails Screencast suggestion: Caching
Site Feedback • Asked by Sascha M.
Hi there, just a quick suggestion. I'm at a stage where I'm struggling with Caching. Since you haven't covered this topic yet I would be very happy if you do, especially Database query caching. ...

CSV Import: Whitespace (blank) results in an error
General • Asked by Sascha M.
Hi there, I`m using the CSV Upload as described in one of your pro-tutorials. The code loops through the csv and adds records to the specific table. But if there is a whitespace inside a row...

Using multiple theme in Multi tenancy application
General • Asked by Oyewole Samuel
Great work Chris, this my second month in this forum and i really enjoy the series of tuts, please i'm currently working on multi tenancy application that require user to select desired theme. plea...