Skip to main content
Gravatar
Storing Product Properties
General • Asked by Michael Victor
I'm creating a jewellery product catalogue application and I need to store properties for each product such as material, finishes, product type etc. I've concluded that there needs to be a model...

Gravatar
Adding a Admin Interface to devise
Gems / Libraries • Asked by Sascha M.
Hi there, first of all: I'm pretty new to Rails, so please don't blame me if I ask a stupid question :) I use devise + cancancan for authentication and authorization. The user model is alread...

Gravatar
Nested forms with rows like a table
General • Asked by John Munyi
Hi Chris, I am battling nested forms , but not your standard .. what I want is a situation where the form behaves like a table where each new row will represent the object from the partial(nest...

Gravatar
in app notification
General • Asked by Aime Ngongang
Hi Chris do you have an example of in app notification like the one you use here. Basically you comment on a question I asked then I see it in the badge in the nav bar. Could you please show us a c...

Gravatar
Grabbing all the has_many relations of a specific collection
General • Asked by Chris Zempel
I've got: ```ruby class User < ActiveRecord::Base has_many :photos end class Photo < ActiveRecord::Base belongs_to :user end ``` Each user has a "shadowbanned" attribute (t...

Gravatar
Saving _form along with has_many through items
General • Asked by Michael Stitt
Hi Chris, I'm having difficulty wrapping my head around how to save a form (`Kit`) that includes optional items for a `has_many through` relationship (`AmazonProductKit`). Here are my models: ...

Gravatar
custom method in class to perfom simple calculation
General • Asked by John Munyi
Hi Chris, Checkout mt simple scenario below: I am trying to get the total count of all absent and present person from an attendance sheet here are my models. class AttendanceSheet < ...

Gravatar
Ajax Search Remote True across the site
General • Asked by shakycode
I'm building an app in Rails 4.2.x and I'm using Ransack + Geocoder for my searches. Originally I setup a Remote: True search using Ajax in my index action and I can search no problem with the res...

Gravatar
Could you do a screencast on how to build notifications with Rails?
General • Asked by Ken Hibino
I've been trying to add a notification system (bell icon on the header) to the app I'm building. The implementation I came up with is very awkward and I'm sure there's a better way to do it (maybe ...

Gravatar
How do I connect multiple devise apps for a single login to any of the apps?
Gems / Libraries • Asked by Thomas Bush
For a rails/devise project I'm trying to figure out how to have the same devise login (email/password) work for multiple apps on different domains. I can't figure out if this would that be conside...

Gravatar
Stripe - Not cancelling access until the end of subscription period
General • Asked by Tony
Chris great job with the Stripe videos. I've just been through and implemented them. :) The next bit I need to add is to stop my users access from disappearing the minute that they cancel. If th...

Gravatar
Multiday with calendar gem
General • Asked by John Munyi
Is possible you shed some more light on this .... which is the best approach in my event.rb i so fat have this class Event < ActiveRecord::Base belongs_to :user def...

Gravatar
How do I make comments show the user who created it?
General • Asked by Wesly Mezarina
I would think that i could do something like the code below but it's not working. How can i approach this so it can show the user who created the comment and other information about the user? I ...

Gravatar
How do I make commentable comments available on the index page?
General • Asked by Thomas Connolly
I've got the polymorphic comments working on the two show pages, but I want to show all my posts (and reports) along with their comments on the two respective index pages. I can't seem to get it.

Gravatar
redirect loop on ActiveAdmin and authorization with cancancan
Gems / Libraries • Asked by John Munyi
When i try navigating to http://localhost:3000/admin i get "This webpage has a redirect loop" and also my logs I have Started GET "/admin" for 127.0.0.1 at 2015-11-25 17:58:35 +0300 Processin...

Gravatar
Group records by month to display in a chart
General • Asked by Francisco Quinones
Hi Chris Im using HighChart and I have some data that want to display in group by month.

Gravatar
How do I post comment with ajax in rails 4.2 ? Can I please have a detailed example?
General • Asked by Aime Ngongang
How do I post comment with ajax in rails 4.2 ? Can I please have a detailed example?

Gravatar
Devise no current_user data after update
Gems / Libraries • Asked by Erick Sitter
Forum Threads Controller class ForumThreadsController < ApplicationController before_action :authenticate_user!, except: [:index, :show] before_action :set_forum_thread, except: [:index, :n...

Gravatar
Subtract until zero then go to next record
General • Asked by Wouter van den Beld
Hi, I am looking for this: for a warehouse application for ordering and keeping stock for machine maintenance . i have multiple record of items that coming in. On Monday i received a it...

Gravatar
How do i track a course progress?
General • Asked by Jay Kapoor
Hey Chris, I have been trying to build a onemonth like sample website. How do i track the user's progress for each of his course. Just like onemonth all these courses have multiple episodes, and...