Skip to main content

Search Results for ""


Videos
































































































































































































Community Discussions


3 posts Gravatar

Watchlist Toggle

Site Feedback • Asked by Ron Huppert

Hi Chris, Not sure what the origianal intention was regarding the "watch later" button other than marking the specific episode, but I wondered if it could be added to the episode filter options....


2 posts Gravatar

Video Series on Security for rails?

Site Feedback • Asked by Masud Hossain

Is there any videos for best practice security routines for Rails? Things to do or not do so that your rails app isn't compromised by hackers.


7 posts Gravatar

Lots of trouble using LESS in a paid theme.

CSS • Asked by Jesse Waites

Hi, I have a paid theme from Themeforest that uses LESS. It sucks, but I didn;t notice at the time. I am using the less-rails gem and things were going OK. I am now trying to put together an admin...


2 posts Gravatar

How to Upload Video using video encoder FFMPEG?

Rails • Asked by Talgat

Is there any resources or tutorials about uploading videos(songs) through Carrierwave and using Video.js ? I heard also that I should use encoding(ffmpeg) if I want to upload.


1 post Gravatar

How to version model validations for an API?

Rails • Asked by TRADEO

Some thoughts on API versioning: Why is API versioning necessary at all? It is required for when we want to make some breaking changes to an API endpoint, like stop accepting certain parameters...


4 posts Gravatar

After I submit(click) the form(submit input tag), the submit tag become disabled, how can I avoid this?

Javascript • Asked by Larry Qu

The purpose is add product to cart, target is blank. After I submit(click) the form(submit input tag), the submit tag become disabled, how can I avoid this? I need it is always enabled for cli...


9 posts Gravatar

Error Handling in Ruby 4+

Rails • Asked by Nathan La Barbera

Does anyone have any thoughts or why this might be a bad practice? I am using the following code as the last route within my routes.rb get "*path", to: redirect('/') It seems to handle very...


5 posts Gravatar

How to send Webhook?

Rails • Asked by Andre Zimpel

I'm building a content management service which needs to send a webhook everytime the user saves a record. What's a best practice to send webhooks in a rails app? A LOT of tutorials are about re...


4 posts Gravatar

Polling/Long Polling navbar notifications

General • Asked by Christophe Estanol

Chris I have been using your implementation of navbar notifications and I really like the way it's constructed. I can implement Facebook style notifications and I am pretty happy about it. Howeve...


3 posts Gravatar

Release GoRails platform subscribers or OSS?

General • Asked by Samnang Chhun

I'm not sure it's a good idea to release GoRails rails application only to subscribers or OSS. If so, we could benefit from some contributions on whatever features that you have planned to add or t...


9 posts Gravatar

Why are these partials rendering differently?

General • Asked by Chris Zempel

I’m doing a thing where I’m rendering table rows: ``` <%= render partial: "choices_table_row", collection: @images, as: :image %> ``` Then, inside that partial: ``` <tr id="image_<%= im...


2 posts Gravatar

Is there a good reason to not use keyword arguments always?

General • Asked by Rutul Dave

I have used keyword arguments for some of my methods before, but haven't really thought about why not use it for all methods with arguments? Seems like there is no good reason to have the calle...


2 posts Gravatar

Is possible to check boolean value by JS?

Javascript • Asked by Dmitry Amelchenko

In Rails 4 app i need to implement bootstrap modal when user comes for first time and accept the terms. I'm trying to do something like this: **application.html.haml** ``` ... = content_tag :b...


1 post Gravatar

when use carrierwave to upload mutiple images in one product , the active_admin edit one product page error.

Gems / Libraries • Asked by Larry Qu

I want to add or upload multiple images in one product, but after I implement this , the active_admin edit product page error. in products_controller.rb, permit the images , which type is jso...


1 post Gravatar

How do I access the Google Adwords API to build custom reports for my clients.

Rails • Asked by Arjun Rajkumar

Hey! Just looking to learn how APIs work - and how I can access the Google Adwords & the Google Analytics APIs to get data from them and create custom reports for a client. New to APIs - so just tr...


3 posts Gravatar

Video Idea: Accepting Credit Card Payments

Site Feedback • Asked by Michael Stitt

Most web apps need the ability to accept payments from their users (whether they're automated monthly payments or just simple one time payments). It was such a easy process getting going as a Pro ...


2 posts Gravatar

Associating Radio Buttons With Specific Field Subsets In Rails

Rails • Asked by Chris Zempel

**Situation:** A user enters the name of a venue they want to add. I query an external API and get back a list of possible venues they actually meant, which they'll then confirm. The venue model wi...


6 posts Gravatar

Using Pundit to build in a cool gmail-feature

Rails • Asked by Chris Zempel

I'm building an app with data set up similar to this: ```ruby class Company < ActiveRecord::Base has_many :products has_many :options, through: :products end class Product < ActiveRec...


8 posts Gravatar

API Design Decisions

General • Asked by Chris Zempel

I'm designing & building an API for a company and have arrived at a decision point I can't figure out. we're providing access to records. right now they want to quickly integrate with one client...


2 posts Gravatar

What is the best way to determine the country/currency for a user?

Rails • Asked by William Gillett

I am using a similar set-up as gorails - devise for registration and stripe for subscriptions. I have separate plans for each currency were are going to market to (USD, CAD, GBP). But I want to...


5 posts Gravatar

Remove omniauth and convert existing users

Gems / Libraries • Asked by Nino Rosella

Hi everyone I have LinkedIn omniauth sign in up and working on my Rails 5 app in accordance with the Devise guide: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview I have some ...


4 posts Gravatar

Making a gem like thoughtbot's refills gem

Gems / Libraries • Asked by Josh Sandlin

Heya, I saw on HN the other day that USDS has released a styleguide/component system based off of Bourbon. I'd like to toy around with making a gem based off of the Refills gem that allows me to...


4 posts Gravatar

store_accessor with jsonb nesting

Rails • Asked by Francisco Quinones

So Im building a user permits column with jsonb. jsonb column ```permits:{ bar_permit: { key1: [], key2: "Bar", key3: false, key4: ...


2 posts Gravatar

Restrict Rails Model To Create after Certain Condition

General • Asked by sid d

Requirement:: We have implemented Passport where any user can subscribe to this passport. I want to restrict subscriptions after 20 subscriptions happen. How can we go with this. Any ideas ?


4 posts Gravatar

Select Form Helper Required True Not Working

Rails • Asked by shakycode

I'm doing a very simple select field in a form which looks like this: `<%= f.select :phys_option, options_for_select([["N/A", "n/a"], ["No", "no"], ["Yes", "yes"]], :selected => @run.phys_option...


4 posts Gravatar

Pundit for RESTFUL actions on Model fields

Rails • Asked by Jay Killeen

Hey does anyone know how to use Pundit to control a users ability to edit a field. I'd like all users to be able to change simple things like their name but I want admins to be the only one's who c...


69 posts Gravatar

Ruby issue when doing cap deploy production

General • Asked by Anthony Candaele

Hi, I'm following the Deploy Rails guide. However, when I run cap production deploy I'm getting this error message: $cap production deploy DEBUG[be6b6bd6] Running /usr/bin/...


1 post Gravatar

deeply nested forms

General • Asked by John Munyi

Hey Chris i am tinkering with deeply nested forms, all is well but I can manage to render the show with all 3 forms in one ... esp the last form. when its added I get non method error and i am sure...


3 posts Gravatar

How do I include a placeholder for empty notifications

General • Asked by Stan Smith

Your In-App Notification code worked perfectly. However I'm stuck on what code to use to display a placeholder message if there aren't any notifications. You mentioned this briefly in the episo...


12 posts Gravatar

How do I add Ransack in my posts controller?

General • Asked by Brian Gilbank

I am new to rails so this might be an easy question. I am trying to figure out the best way to add ransack to my posts index action. # Ransack @q = Post.ransack(params[:q]) @posts = @q.resul...


1 post Gravatar

JWT Authentication using Devise

Rails • Asked by Carlos Orellana

I've been looking for a really god material about how to create Authentication using JWT and Devise, after that consume that with ReactJS (Mainly the rails part, but the react is a plus) Some ma...


3 posts Gravatar

deploy Rails

Rails • Asked by Anthony Candaele

I following the deploy rails instructions on GoRails. When I tried to install Ruby 2.1.2 with rbenv, I got this error message: "no acceptable c compiler found in $PATH" I solved it by ...


5 posts Gravatar

Multiple Rubies using Rbenv

Ruby • Asked by shakycode

I'm having total brainfog right now with rbenv, so please excuse the newbie question. I have rbenv installed and my global ruby install is `1.9.3-p194` which I've developed multiple apps in. I'...


2 posts Gravatar

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


3 posts Gravatar

Using scopes to rank users based on votes they get from their posts

General • Asked by Ariff Munshi

Hi all, I posted this question on Stack Overflow for a problem I am stuck at. http://stackoverflow.com/questions/30805987/using-scopes-to-order-users-with-most-votes-for-specific-time-periods ...


6 posts Gravatar

2 Factor Authentication

Gems / Libraries • Asked by Shaun Fahey

Hey Chris. This would be good for a screencast, well i'd like to see it for sure! https://github.com/tinfoil/devise-two-factor


4 posts Gravatar

Is it necessary to use authentication with an API if there aren't really any 'users'?

General • Asked by Greg Blass

I'm writing a React Native app that is purely informational (medical information), with a Rails API for the back-end. The first main question I have is whether its necessary (or a good idea) to ...


3 posts Gravatar

Simple Form - Make label appear after input

Gems / Libraries • Asked by Michael Victor

I have a simple form tag as given below: = f.input :email, required: true, input_html: {class: 'md-input'}, wrapper_html: {class: 'md-form-group float-lable'} and it generates the below HTML ...


5 posts Gravatar

Hi, my name is...

General • Asked by Ryan Blakely

Ryan Blakely. I'm a PHX, Arizona based Rails developer. I started learning Rails about 2 years ago during my senior year of college at Arizona State University. After graduating and working for a y...


1 post Gravatar

How do I set up dynamic routes?

General • Asked by Chris Collinsworth

I asked this question on Stack Overflow: http://stackoverflow.com/questions/35519550/dynamic-routes-rails-4. If anyone has any feedback or an answer to this I'm all ears. I've been hashing through ...


2 posts Gravatar

404 Not Found after deploy to Ubuntu server

Servers • Asked by Jagger Kyne

I followed the [tutorial](https://gorails.com/deploy/ubuntu/14.04) on this site and deploy my rail app on the newly setup ubuntu server. the rails app is successfully run on heroku, so it must s...


3 posts Gravatar

How do I parse this JSON output?

Rails • Asked by Stan Smith

I'm trying to extract the "text" element if the "type" is "Person" from this JSON output. I''ve been able to store the JSON in an instance variable @output and am using the following to begin iter...


1 post Gravatar

Streaming CSV Output to the User's Browser

General • Asked by Sascha M.

Hello, I'm referring to https://gorails.com/episodes/export-to-csv?autoplay=1 is there an easy way to add a function to actually stream the file contents to the User's Browser, like described...


2 posts Gravatar

Activity Feed with Public Activity Gem ?

Gems / Libraries • Asked by Ahmed Althani

Hi Chris, Thanks for the tutorial. It really helped me a lot. Can you please post a video about How to install the public activity gem to show all the activities done by the user. Thanks a lot a...


2 posts Gravatar

[HATCH] Some questions :)

Rails • Asked by Sascha M.

Hey there, i have a few questions rg. your new product Hatch. 1. is there a Heroku-like way to insert a SSL cert or do we need to do that manually? 2. What permissions are we granting so you...


4 posts Gravatar

How do I send Prawn pdf via email

Rails • Asked by Neil Patel

Hello Everyone how do i attaced a prawn pdf to email . I have implemented the prawn gem so when you generate a new form and add the .pdf ot gives me the PDF , which works. but now when the for...


4 posts Gravatar

Anyone with experience using Quilljs?

Javascript • Asked by Stéphane Paquet

Hi, I'm lloking forward using http://quilljs.com in a project and wonder if anyone can share his/her experience with such text editor. Related gems are looking pretty outdated (I'm using Rail...


5 posts Gravatar

How do I hold Braintree payments for longer than the given escrow duration?

General • Asked by Tharan Raj

I want to create a payment system using Braintree that will only charge the user once a certain condition is met. Lets assume its like freelancer and we need the payment to only go through when the...


1 post Gravatar

Properly adding Turbolinks 5 event handling

General • Asked by Chris Zempel

Here's what I understand: * Turbolinks preserves the `window` and `document` from request to request * As a result, I should add click/change listeners to the window/document once when the js i...


2 posts Gravatar

Suggestion: links open in a new tab

Site Feedback • Asked by Danny Wu

I know this may be a personal preference, but I've always found it more user-friendly (from a student's perspective) to have the links (i.e. your github code and forum) open in a new tab.


3 posts Gravatar

How would I use cookies in a check_box_tag to maintain state between page requests?

General • Asked by Lance Williams

I've created a multi filter widget using a search_field_tag, and multiple check_box_tags and I can't seem to figure out how to maintain the checked checkboxes state throughout the session. So for ...


1 post Gravatar

Add a coment in a post ( how can I do)?

General • Asked by Federico Calarco

I'm coding my personal website , I have a backoffice where I can write blog_post ( title , content , category and date ). I would like to make user comment my blog post without being logged in . ...


9 posts Gravatar

Has any installed macOS Sierra yet?

General • Asked by Jordan Godwin

Just curious if anyone is running macOS 10.12 Sierra yet, and if so, how are things with your dev environment? Specifically with Homebrew and such?


4 posts Gravatar

Set field on multiple records on save/change of 1 record

Rails • Asked by Wouter van den Beld

I'm working on a maintenance planning/cost application. With the help of gorails, onemonth, codeschool and all other great resources I am almost ready to launch the first release. However I can rea...


7 posts Gravatar

What are the best practices for generating SEO friendly urls in Rails 5?

Rails • Asked by William Kennedy

What is the best way to generate SEO friendly urls? The Rails default is to put the id in the URL e.g articles/2 I want to be able to have a url like this articles/article-heading Prev...


3 posts Gravatar

How to I access a position attribute on a join model?

General • Asked by Thomas Bush

I have case studies and site models in my database. I have a `has and belongs to many` association set up between them. ## site#show When on a `site#show` page I want to write the following ...


7 posts Gravatar

Coffeescript Polling Issues

Javascript • Asked by Chris Zempel

I'd like to reload an iframe when the images needed to generate the preview it will display are cached by background workers. However, I can't figure out how to get setTimeout() to work correctly (...


4 posts Gravatar

Freelance advice

General • Asked by Karim Tarek

Hello 👋 I got into freelance recently, I thought I'd reach out to the veteran freelancers in the community to seek advice, things I'm curious about, are: * What is(are) the most important s...


2 posts Gravatar

Putting SignIn and SignUp in single page using devise rails

Rails • Asked by Earl Greenwood

Is it possible to have sign in and sign up forms on the same page,and after sign in or sign up redirect to the index page?like twitter or facebook?


1 post Gravatar

CanCanCan: Defining Abilities

General • Asked by Sascha M.

I'm using the CanCanCan gem. According to the documentation you can define abilities. That is working for me. What I want to do is to limit the access to records, that contain a value. Something li...


3 posts Gravatar

[Feature Request] Ask for Topic/Episodes/Series

General • Asked by Jorge Dominguez

So hello guys, All of us have great ideas, and all of us want to know whats next episode would be. So this is my idea. List of Topics with likes. Everyone can enter the topic that would l...


4 posts Gravatar

Forcing a file to download instead of displaying in the browser

General • Asked by Tony

I've got a website where users can upload things such as a mp3 and the files are being stored on Amazon S3. If a user clicks the file it just seems to open as a streaming file in the browser. I...


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


5 posts Gravatar

undefined method `map' for nil:NilClass on select_collection

General • Asked by John Munyi

Hi, I have been struggling with this error for the last 3 hours and its s bit frustrating: Here is the scenario I am trying to populate a select box with Team names that belong to a specifi...


4 posts Gravatar

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


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


2 posts Gravatar

Active PAGES & User(s)

General • Asked by Menj Villalobos

Hi, Do you have any tutorials or guide on how to show/list all active "pages" & "users"? ex. Home Page, one "div" will list all active pages where the user(s) currently viewing or browsing and...


4 posts Gravatar

Having different rails and gems versions installed on dev environment ?

Rails • Asked by Lykourgos Tsirikos

Hi all, I'd like some clarification from someone who's more expert than me, if possible. I'm currently having RVM and Rails *4.2.6* installed on my development environment in which I have bu...


2 posts Gravatar

I need help setting up Acts_as_Follower Gem

General • Asked by Darion Wood

The documentation for this gem is very shotty, and I can barely understand If you can help me setup the methods for the controller, views, toggle on and off follow button, and blocking users. That...


8 posts Gravatar

Can someone help explain how to use test_double to mock a gem class in my app?

Testing • Asked by Bill Snapper

Hello, My app uses a gem that goes out to network devices. I want to write some specs that test my classes without going out to the network devices via the gem. I want to use test_double or so...


4 posts Gravatar

On what server is Gorails hosted?

Servers • Asked by Nymweb

On what server is Gorails hosted? I'm looking for one for a project


3 posts Gravatar

How to add ssl to the CDN of AWS

General • Asked by Francisco Quinones

Hi so I have a rails app with ssl from godadddy with a wildcard for subdomain. Now I move my assets to use CDN, but I need to use the ssl so all my subdomain use the assets with out getting CORS po...


28 posts Gravatar

Idea for TimeClock Need Advice

General • Asked by shakycode

I'm wanting to integrate Time Clock functionality into an existing Rails 3.2.21 app. I think I have an idea of how to do this, but I need some advice on the how to handle different scenarios. S...


1 post Gravatar

How do I allow a multi-select to be sortable?

General • Asked by Thomas Bush

I have a ton of many-to-many relationships in a CMS I built for work. I am currently using [Select2 3.5.3](http://select2.github.io/select2/) to assign these relationships. This all works well. ...


4 posts Gravatar

How to migrate from Heroku to Digital Ocean

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


3 posts Gravatar

How do I rollback a database migration and then update it

Rails • Asked by Neil Patel

Hi I have added a column ( t.time "usual_start_time") to an exisitng table called Areas. (create_table "areas",) create_table "areas", force: :cascade do |t| t.string "location", ...


2 posts Gravatar

How to render partial as a json response for json format?

Rails • Asked by Srinivasa Varma

Hi Guys. Recently i ran into a problem which does not allowing me to render a partial as a JSON response for .json requests. Below you can get in more detail. I have a partial resides in belo...


3 posts Gravatar

How can I allow my users to configure their account (created w/ devise) with their smtp server, so they can send & recieve emails in my app?

General • Asked by Drilon Buzuku

Are there any ruby gems for this specific problem? Or should I just use ActionMailer from Rails? If ActionMailer are there any tutorials on this topic online?


3 posts Gravatar

Getting a 403 on Ubuntu + Nginx

Servers • Asked by Peter Boomsma

My error log outputs the following, [ 2014-11-02 04:18:12.0511 23504/7f64e6a36780 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'def...


2 posts Gravatar

Email Stripe Receipts

Rails • Asked by Steve Polito

Firstly, thanks for the great Stripe tutorials! I just finished implimenting basic subscriptions on my rails app. However, I do have a few questions regarding emails. **Will Stripe automatically...


2 posts Gravatar

Whats the best way to deal with JS in Rails?

Rails • Asked by Alan Reid

In my quest to ever understand rails, i notice that Rails adds a few JS files to the bottom on my page. Whats the best way to deal with this? Looking at the likes of AirBNB they don't have this...


1 post Gravatar

How do I order by an associations serialised value?

Rails • Asked by Andre Zimpel

Folowing setup: I got a rails app with dynamic content types. An user can create a content type and add fields (string, integer...) to it. Those are basically the smae like reugale rails models ...


1 post Gravatar

How do I showcase ruby skills for Backend Developer in Mind

General • Asked by Nahwin Rajan

Hi guys, It may be out of topic but got to ask and get some help. If We are going for Ruby Developer role (specifically for the Backend type), how do we showcase our skills ? Is it by buildi...


8 posts Gravatar

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


20 posts Gravatar

Must Read / Must Watch

General • Asked by Chris Oliver

I thought I'd start a thread of articles and videos that are super high quality for software developers. Things that make you think and improve your thinking and how you build products. I'll sta...


1 post Gravatar

undefined method username after update

General • Asked by Erick Sitter

Forum_threads Controller class ForumThreadsController < ApplicationController require 'forum_controller' before_action :authenticate_user!, except: [:index, :show] before_action :set_fo...


2 posts Gravatar

error while setting up ruby on rails

Rails • Asked by oliver

I messed up my .bash_profile while installing ruby on rails on mac terminal. I am getting errors like -(bash: touch: command not found) and (.bash_profile permission denied) when i open the termin...


2 posts Gravatar

rails testing always raise the same error

Rails • Asked by Larry Qu

No matter which test file does I run, it always raise this error. I don't konw how to fix this, thanks! ``` $rails test test/integration/about_test.rb Running via Spring preloader in proce...


4 posts Gravatar

How do I create two buttons that generate CSV files with different attributes?

Rails • Asked by Stephen Strange

Hello, I have two questions: 1) I would like to create a button that can generate a CSV file with one set of attributes, and another button that will be able to generate a different set of attr...


7 posts Gravatar

How do i print out validation error?

Rails • Asked by Matt Taylor

So i'm going through building the forum series and whenever i submit the form, it is just re-rendering the new form page. I looked in my server logs and I see that `Parameters: {"utf8"=>"✓", "authe...


3 posts Gravatar

twilio as verification mobile systems

Gems / Libraries • Asked by corrado tuccitto

Hello I'd really like to implement the following tutorial (verify phone number by sms) http://fullstackstanley.com/read/verifying-mobile-phone-numbers-with-rails-devise-and-twilio It doesn't w...


4 posts Gravatar

Integrating Mailboxer with Apartment

General • Asked by Satchit Shenoy

Hi, I'm trying to integrate mailboxer with apartment, and am having an issue with migrating the tables. I want the mailing service to be universally applied to the app, but apartment migrates th...


5 posts Gravatar

Announcing the GoRails Forum

General • Asked by Chris Oliver

Hey everyone! Today I am releasing the GoRails forum. This is the place you can turn when you need advice for how to design a feature or refactor your code. I'll be answering questions here and ...


6 posts Gravatar

Dynamic view based on associations

Rails • Asked by shakycode

I'm trying to add some view logic functionality to one of my apps. I have a "run" view that lists all runs and splits them up in a partial between active and pending. Each run also `belongs_to :r...


10 posts Gravatar

Capistrano Rbenv Bundle Failed

Servers • Asked by Agung Setiawan

Hi, I'm following this tutorial on deploying rails app https://gorails.com/deploy/ubuntu/16.04 About to reach the last step but it failed when performing bundle install as screenshot below ...


2 posts Gravatar

Send an Email On a Date Specified in a Database Column

Rails • Asked by Liz Bayardelle

I have what I think is a working setup to send emails via `Delayed_Job`. However, I haven't received my test email and it isn't practical to wait for more to happen with a delay of days. I need t...


2 posts Gravatar

BDD in a real project

General • Asked by Wei Shi

Hi, Chris, I just subscribed to GoRails. Thanks for bringing us this great site. I really enjoy watching episodes, and I believe Go Rails has the potential to become one of the major resources ...


5 posts Gravatar

how do i link a comment to a specific post...

Rails • Asked by khemlall mangal

Can someone give me an example of POST and Comment.. i did a scaffold of a blog for example but i am not sure how to integrate the part where you can link a comment to a specific post.... COMME...


5 posts 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 du...


6 posts Gravatar

Routing question: Pass a 2nd parameter in the URL?

Rails • Asked by Alan Reid

Hi again :) I would like to know how to get my routes how i want them haha as we all do :) Basically i want to get the edit variant URL to be like `/products/:product_id/variants/:variant_id` ...


5 posts Gravatar

Handling multiple Account types

Rails • Asked by Orlando Del Aguila

Hello Guys, I'm doing some research on how to handle multiple account types. In our app, we will have two types of accounts. **Parents** and **Schools**. These accounts will never change types, ...


4 posts Gravatar

Edit Data on same page

Rails • Asked by Jorge Dominguez

Hi there guys, I would like that you help me found a tutorial to edit data on the same page and save to database.


3 posts Gravatar

How to make a good Sidekiq job?

Gems / Libraries • Asked by Tang Rufus

From the [Sidekiq wiki](https://github.com/mperham/sidekiq/wiki/Best-Practices#2-make-your-job-idempotent-and-transactional), a Sidekiq job should be idempotent and transactional. How should we imp...


3 posts Gravatar

How do I use pushstate to create infinite scrolling blog effect in a standard rails app?

General • Asked by Thomas Bush

How do I use pushstate in a simple rails blog to create the effect that larger new sites are currently using: as you scroll to the bottom of the page, the next article seamlessly is loaded, the url...


7 posts Gravatar

How do I allow viewing of a paranoia soft-deleted show page?

General • Asked by Thomas Bush

I added paranoia gem to my cms application from your soft delete tutorial. I would like users to still be able to access the show page of soft deleted items -- this is where I would add a restore ...


6 posts Gravatar

rails5 + heroku + cloudfront + fonts

Gems / Libraries • Asked by Szilard Magyar

I tried to configure a rails5 app (deployed on heroku) with cloudfront for assets and fonts. I could make it work for the assets, then I tried to add the config for the fonts as well, but I just sc...


11 posts Gravatar

How can I solve it?

General • Asked by Federico Calarco

Hello guys I have a problem with this! I'm making my website where user can give feedback to my projects, contact me and make comment to a blog_post. The problem is when i make the render 'blo...


3 posts Gravatar

Rails console hacks :)

Rails • Asked by Sascha M.

Hi there, I need some help how to handle the rails console commands. I'm really stuck here.. I've recently added a new column (teams) to my Sales and Orders model. Both models containing the ...


5 posts Gravatar

How do I debug why my ActionCable broadcast is returning nil?

Rails • Asked by Matt Taylor

Following along with the ActionCable Series. So in **irb** when i run the `ActionCable.server.broadcast "notifications:4", {html: "<div>Hello</div>"}` it comes back with **nil** instead of retu...


4 posts Gravatar

Opinion: Destroy or not destroy

General • Asked by Dan Tappin

I am working on an app and I have already added the paper trail gem (https://github.com/airblade/paper_trail) to track revisions. Now I am thinking that I want to add Paranoia (https://github.com/...


3 posts Gravatar

could not connect to database postgres

Databases • Asked by Peter Boomsma

I'm trying to install postgresql but I'm running into an error when I try to create a user: createuser: could not connect to database postgres: could not connect to server: No such file or d...


3 posts Gravatar

Clarification needed for simple_calendar sort_by method

General • Asked by sid d

Hi Chris, I've seen `simple_calendar` ruby gem and i stuck at sort_by method (calendar.rb) ``` def events_for_date(current_date) if events.any? && events.first.respond_to?(:simple_ca...


7 posts Gravatar

How to by pass a string that has '???????' when scraping for dates and turning the date into an integer?

General • Asked by Wesly Mezarina

I'm scraping a anime information website. Right now, I'm trying to get the date going, but on some of the anime the date comes out as ???,??,????. I'm tying to figure out how to skip that or put so...


2 posts Gravatar

Why do you choose ams (active model serializer) over jbuilder or the other way around? (Rails API)

Gems / Libraries • Asked by Drilon Buzuku

Hey Guys, I'm interested in knowing, why some developers choose ams over jbuilder and some prefer jbuilder over ams, to build Rails based API's. Cheers, Drilon


2 posts Gravatar

URL Based multi tenancy

General • 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, www.domain.com/samsoft, how can i achieve this and also routing? sample code will be ...


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


2 posts Gravatar

When to use scoped models?

Rails • Asked by Tang Rufus

In `Refactoring CSV Uploads with ActiveModel::Model Download` , you make a scoped class `User::Import`. When should we use scoped class like this? And, how does it different from `rails genera...


2 posts Gravatar

Spree commerce vs custom solution from scratch

General • Asked by Sam Uherek

Hey Chris, like most people already mentioned, awesome content on GoRails.com. I love how you give additional explanation to how things work and not just a step by step tutorial how to make somethi...


3 posts Gravatar

Search all models gem

Gems / Libraries • Asked by Ali Rizvi

I have seen this done in other rails application where you can search for a term and it would search across multiple models and return results from each. What is the best gem to use for this purpos...


2 posts Gravatar

Devise User with separate Profile

Gems / Libraries • Asked by Benny Maas

Hi, i am using Devise and i want to a separate profile for each user with additional informations like address, phone, mobile, ... After Signup, the user should be forced to fill out his profil...


3 posts Gravatar

Multi form devise registration setup with admin approval

Gems / Libraries • Asked by Roman Storm

Scenario: Implement a registration with multiple steps and after all is complete, display "We will approve your application" at the end and wait when an internal admin (only to owners of the app) ...


9 posts Gravatar

Single Devise User Model or Multiple Devise Models?

Gems / Libraries • Asked by ronald chacon

Hi all, I am planning to create an application that will have several types of users with a couple shared fields and many unrelated fields. What would be my best option? After doing some rese...


9 posts Gravatar

Opt-in to receiving thread notifications

Site Feedback • Asked by Nick McNeany

Hey Chris, It would be great if users had the ability to opt-in to receiving new thread post notifications. Sometimes I like to just throw my two cents in, but don't really intend on following ...


12 posts Gravatar

Is Devise always a good choice?

Rails • Asked by Ryan Swapp

I am building a contest/promotion app (see my other thread) and am now to the point at which I want to add users. I've used Devise in the past, and have also rolled my own auth system. I like the c...


9 posts Gravatar

GoRails speed

Site Feedback • Asked by Isaac Ben Hutta

Hi Chris, It would be nice if you could share with us what techniques you use to make this site so fast, and if and how do you deal with scaling problems.


1 post Gravatar

Trouble with part 3 of Direct Uploads to S3

Rails • Asked by scott tallarida

I am working through your Direct Uploads to S3 series and have run into a snag that I am hoping you can help with. Everything has worked as advertised UNTIL I added the js in episode 3. Now I a...


5 posts Gravatar

How would i go with making an inventory for products?

General • Asked by Wesly Mezarina

I'm not sure if i'm saying it right but how can i manage inventory for my products? What are some steps that i have to take to get started?


2 posts Gravatar

Are there any reasons why my Helper methods are not picked up?

Rails • Asked by Alan Reid

Hi I have a helper method, which converts currency to pounds. Is there any reason why this donest get picked up in the mailer templates, but works thoughtout the rest of the site?


7 posts Gravatar

2 sites... 1 DB?

Rails • Asked by Alan Reid

Hello all! It's been a while since i was here, but i am back! So today I would like to get some opinions on a project I am working on. So here we go... What would be the best way to architect...


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


5 posts Gravatar

CoffeeScript Class + Partial remotly reloaded + Binding

General • Asked by Thomas M

Hi, I'm currently rewriting my js file following the class encapsulation episode. It works well but I'm struggling on with the binding/response for my image uploader. My view contains a form...


3 posts Gravatar

Number of posts on index / Posts pagination

Rails • Asked by Erick Sitter

I followed your forum series and it's going to work out well for me, but I couldn't figure out how to display the number of posts on the main index for each forum thread. I'd think it would h...


2 posts Gravatar

Automated email notification summary

General • Asked by Andreas Koutsoukos

Hi, I like to have my application to send automated emails summary to users. Users have multiple profiles that they can make and like to notify the users by email if there is more than 5 new profi...


3 posts Gravatar

Bootstrap Devise User create, edit and sessions new

CSS • Asked by Jay Killeen

Hi All I had some difficulty following this https://gorails.com/episodes/user-authentication-with-devise - screencast when it came to Bootstrapping devise. Chris' looked like a bit of extra e...


9 posts Gravatar

Search functionality for the screencasts

Site Feedback • Asked by harsha vardhan mudumba venkata

It would be great if can search through the screencasts. You will definitely need one once the number of screencasts increase.


4 posts Gravatar

rubber:passenger:add_to_pool takes forever

Servers • Asked by Michael Victor

I'm using Rubber 3.1.0 with Capistrano 2.15.5 When I try to deploy my app(default rails-devise-pundit) to production on EC2, it goes on perfectly till command finished in 2849ms triggering a...


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


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


7 posts Gravatar

Was wondering id there is a way i can simply this ...

Rails • Asked by Alan Reid

I was wondering if there is any way I can simplify this code, Ideally, I don't want to be looking up brands that are associated with the user, i want to do it on hit. ``` #Gets the ID associate...


3 posts Gravatar

Rails Console

Rails • Asked by Chris Ma

Hi all, This might be a retarded question but how do I access things other than Models in rails console, such as Controller methods, engines etc.? I wouldn't mind seeing a video dedicated to con...


3 posts Gravatar

Front-end frameworks and Turbolinks

Javascript • Asked by Nick McNeany

Hey Everyone, I'm having a small problem with the JavaScript components of the [Uikit framework](http://www.getuikit) and I know it has to do with turbolinks. Here's the gem I'm using [Uikit2-Ra...


3 posts Gravatar

Which native app technology to pair with Rails

General • Asked by Aaron Mills

We are currently developing a rails application for a new startup and we are trying to determine which front end and native app technology we should combine with it. We are looking at React JS ...


3 posts Gravatar

Best way to grant a user specific permissions

Rails • Asked by Brent C

Trying to determine which way I should handle this. Normal User adds a post to our system, he then has the ability to update and delete this post. In the future he may assign other users the abi...


12 posts Gravatar

Handle multiple binding when using CoffeeScript & Turbolinks

Javascript • Asked by Roy Zinn

Hi, After watching the screencast about extracting JS code to CS classes, I tried to follow the same pattern. The problem I am facing is that the page loads new items through AJAX and in order fo...


2 posts Gravatar

How to I use Refile as Upload in a polymorphic way? I have managed to use it that way but i am struggling on destroy image after uploading

General • Asked by Aniket Rao

Here is the Schema for Uploads ```ruby create_table "uploads", force: :cascade do |t| t.string "file" t.string "file_id" t.string "file_filename" t.integer "file_si...


1 post Gravatar

Ajax refresh while persisting params

Javascript • Asked by shakycode

I'm maintaining an old Rails app and am trying to have a my index action use a form_tag to pass the params of a region so I can scope the results of calls by region. This works fine and dandy, but...


1 post Gravatar

New Video Ideas

Site Feedback • Asked by shakycode

I was watching CodeSchool's "Feature Focus" the other day. This is where Greg and Carlos look at a popular site/app and pick a piece of functionality to focus on and write it themselves. They the...


5 posts Gravatar

Issues with JQuery AtWho

Javascript • Asked by Darion Wood

Hello, I enjoyed your screencast on implementing the @ functionality for user interactions. What I'm trying to figure out is how to handle the index.json.jbuilder when using devise jQuery -> ...


2 posts Gravatar

Build REST API with Devise

Rails • Asked by Oluwatosin Ekolie

Hi Guys, I've been struggling building an API for an iOS App to communicate with my Rails Web App. For authentication, I'm using Devise. How do I create, update and delete a user through the AP...


4 posts Gravatar

Create a User Profile after saving a Devise User

Gems / Libraries • Asked by Jason Brown

I want to have a user profile instance created in the database which is associated with a newly created devise user. The profile should be created only once and have a user_id associated with the ...


9 posts Gravatar

How to use the Sentimental gem

Gems / Libraries • Asked by Sascha M.

Hi there, I want to use the Sentimental gem to automatically check if an article is positive negative or neutral. This gem here: https://github.com/7compass/sentimental works fine in the Rails c...


2 posts Gravatar

Basics commands for using MacVim

General • Asked by Ryan Bent

Hey Chris, Your videos are awesome. I think it would nice to have some of the basic commands for using MacVim while coding.


6 posts Gravatar

Running multiple Rails versions

Rails • Asked by Jiri Prochazka

Hi guys (and ladies if any), I have installed Rails with rbenv (recommended), but now because of significant changes between 5.0.1 and 5.1 versions, I want to start a new project with 5.1 (becau...


4 posts Gravatar

Best way to render a page as a PDF

Gems / Libraries • Asked by Damon Delcoro

I have tried several methods including PRAWN to generate PDF's. It seem there must be a better way. What is you recommendation?


3 posts Gravatar

How do I separate out the devise form like gorails.com (edit profile, edit password)?

General • Asked by Lance Williams

I've followed this link https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-edit-their-password, but would like to just use the update action and not have to use update_password & u...


6 posts Gravatar

How is routing done with a conditional in url?

Rails • Asked by Matt Taylor

Not sure the correct words to ask the question are. Here is an example from what I have seen: `http://www.gorails.com/series/1?old_content=true` So say Chris re-did some of the screencasts,and n...


13 posts Gravatar

Ideas for building a Wiki in my app

General • Asked by Jay Killeen

My users are all internal customers of our business. They are pretty information poor when it comes to our systems and processes and our company intranet is not very feature rich. So I'd like to bu...


1 post Gravatar

How do I validates uniqueness of parent of parent?

General • Asked by Adrien Nhem

Hi guys! I have 3 models: lectures > chapters > lessons With a has_many through relationship. The problem: each lecture should have a lesson with the same step for ordering. In lesso...


5 posts Gravatar

Polymorphic relationship vs STI vs Class table inheritance with RoR

Databases • Asked by Toshiki Inami

Hi I watch your tuts and it's pretty helpful. Always thanks! I have some question about database design. There are three types of invoice items with following tables 1) **SubscriptionItems**...


5 posts Gravatar

Deploy Fail

Rails • Asked by Jorge Dominguez

HI there guys. Im following this guide: and this is what i get ``` rvm 1.28.0 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] ruby-2...


2 posts Gravatar

How do I add a default time of 6:45pm

Rails • Asked by Neil Patel

Hi Following on from the my previous post I want to add a new time column with the default of 6.46pm I have tried this class AddUsualStartTimeToAreas < ActiveRecord::Migration def c...


4 posts Gravatar

best way to validate URL

Gems / Libraries • Asked by Szilard Magyar

Hi Chris! I've been looking for a good URL validator for a while, but all the solutions I found are kinda weird, so I'm not even sure if I wanna use any. Here is my usecase: A user can create...


15 posts Gravatar

Devise: Add a select to my signup form

Rails • Asked by Alan Reid

Hi all, me again! haha So i have got my app working as i want so far. All is good and i am picking up Rails really quickly thanks to GoRails. I am however a little stuck, I can't seem to add in...


19 posts Gravatar

How do I submit multiple checked items?

Rails • Asked by Alan Reid

Hi all, can someone guide me in the right direction please? Basically i have dynamic options a user can select 1 or many of these items. I thought checkboxes would be good for this. The user...


3 posts Gravatar

Lazy Load - Guide

Javascript • Asked by Menj Villalobos

Hi, Anyone successfully implemented or integrated "Lazy Load" for their rails app? Can I ask some guide/tutorials please. Thanks :)


2 posts Gravatar

Is there an easy way to display open or closed based on time of day?

General • Asked by Stefan Sanchez

So, I am making an application that is listing multiple businesses. I am wanting to have a label that displays open or closed for each individual business. Could anyone give me guidance on how to m...


4 posts Gravatar

Checking if Forum_Thread is updating?

General • Asked by Erick Sitter

Now the actual update is simple it's just @forum_thread.update params and redirect, but as you can see it redirects to the forum_thread which renders the show.html.erb which then causes @forum_pos...


2 posts Gravatar

GoRails Screencast to setup Algolia ?

General • Asked by Mathieu Martinot

Hi, Is there any screencast or project with Algolia ? I think it would be great !!


3 posts Gravatar

Add Download Button to csv-export

General • Asked by Sascha M.

Hi, I did everything (and it's working!) regarding this episode: https://gorails.com/episodes/export-to-csv?autoplay=1 How can I add a download-button in my views for that? Thank you guys!


12 posts Gravatar

Nested attributes with collection_select not saving

General • Asked by Brent C

In my edit form I simply cannot figure out why collection_select isn’t saving the various values when it's nested. It works fine if I use a {multiple: true} and pull it outside of the fields_for ev...


8 posts Gravatar

A `has_one :through` association issue

Rails • Asked by Jack

Hi there, I just subscribed to GoRails and it has been really helpful so far already. 👏 I've been unsure about how to tackle the following situation. Imagine a Receipt model. It can have one ...


1 post Gravatar

Advanced Rails books and materials

General • Asked by Andrei Crudu

Hi guys ... and girls. I am interested in any advanced rails materials you might know about that are actually good. Most of the stuff is beginner level and something advanced is hard to come by....


6 posts Gravatar

simple mde duplicates

Javascript • Asked by Talib Guyani

hi, i followed your tutorial but still simple mde is been diplicated am using rails 5 ``` var simplemde; simplemde = null; $(document).on('ready turbolinks:before-visit', function() { ...


3 posts Gravatar

Multiple Devise Users sharing a dashboard

Rails • Asked by Stephen Sizer

Hi, I have currently two Devise models Company and Contractor. When they sign in I want to redirect them to a dashboard page. At the moment I have a before_action on the dashboard controller ...


3 posts Gravatar

Recurring Events

Rails • Asked by sid d

```ruby # Model def Event WEEKDAYS = ['sunday', 'monday', 'wednesday', 'thursday', 'friday', 'saturday'] end # Migration create_table :events do |t| t.column recurring, default: fal...


3 posts Gravatar

What is the spinning icon I see on GoRails?

General • Asked by Timothy Chung

I see a spinning/loading icon on the right. In addition, I see the loading lightning-like animation right below the address bar, what gem is it? or what library are you using? Thanks. Tim


3 posts Gravatar

Uploading a file from remote url using shrine?

Gems / Libraries • Asked by Roy Zinn

Hi, I need to upload a remote file to my S3 bucket (e.g., I get a link to a pdf e-ticket and I need to upload it from its location). In addition (as a bonus) what's the best way to allow users to ...


1 post Gravatar

Compare two active record results along just one column

General • Asked by Michael Victor

I have 3 models - `Items`, `Customizations` and `Property Maps` Property Maps has a polymorphic association with Items and Customizations The business logic here is, when listing customizatio...


4 posts Gravatar

How do I create hierarchical data with a model?

General • Asked by Félix Landry-Audet

I have found and played with awesome_nested_set which is _awesome_ for real. I was wondering if this is the recommended gem for managing tree data in Rails or if there are any others that would do ...


2 posts Gravatar

Markdown/Emoji : how to host images?

Site Feedback • Asked by Boris Baskovec

Hi, I watched https://gorails.com/episodes/markdown-emoji-with-html-pipeline-gem and I'm wondering 2 things : * Where did you find the asset_root of the emoji images? * How do you use your o...


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


3 posts Gravatar

How do i add a ":unique => true" to an already existing reference?

Rails • Asked by Alan Reid

I have my DB already set up, and it references another table. I need to add in `:unique => true` so i don't get duplicates. I cant however drop the table and start over as there are items in the DB...


1 post Gravatar

Attaching a Characteristic To Multiple Models

Rails • Asked by Chris Zempel

I've got these models: ```ruby class Firm has_many :funds end class Fund belongs_to :firm has_many :investments end class Investment belongs_to :fund has_many :investment...


2 posts Gravatar

Rail API Knock User Authentication

Rails • Asked by Anand Padia

Application Strucutre **Rails API** user model & controller - CRUD blog model & controller - CRUD comments model & controller - CRUD Standard Blog App with Knock Authentication for access To...


3 posts Gravatar

Active Record Associations

Rails • Asked by sid d

```ruby def partner has_many :centers end def center has_and_belongs_to_many :classes belongs_to :partner end def fpclass has_and_belongs_to_many :centers end ``` - I'd like...


3 posts Gravatar

How "expensive" are API calls?

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


3 posts Gravatar

How do I communicate if I won't hit an estimate?

General • Asked by Chris Zempel

Here's a situation I see come up often. New developers (I consider myself here) will always estimate wrong. They will also feel bound to their estimates as deadlines. What's the high value w...


6 posts Gravatar

Getting googlemaps javascript and turbo links working together

Javascript • Asked by Chris Rockwell

Hey Chris - been struggling with this off and on for a bit now. Just trying to add basic google maps using the javascript API (not the gems) to a rails 4.2 app and am having all of the various is...


3 posts Gravatar

jquery.turbolinks not working on my app

Javascript • Asked by Enrique Benitez

I'm using both jquery and turbolinks on my app and because turbolinks don't make full page loads I need some of my js to fire when navigating between pages using turbolinks, I really don't want to ...


2 posts Gravatar

Muliple has_one's on a polymorphic association

General • Asked by John Meehan

I wish to add a billing_address and a delivery_address to my Client's. So i thought i would make my Addresses polymorphic. ```ruby class Client < ActiveRecord::Base has_many :addresses, as...


12 posts Gravatar

Added last_read_at to chatroom_users_controller: No method error

General • Asked by Rob Sturcke

Added the following to my chatroom_users_controller but keep running into a NoMethod Error. ``` def create @chatroom_user = @chatroom.chatroom_users.where(user_id: current_user.id).first_or_...


5 posts Gravatar

What text editor are you using for GoRails Forum?

General • Asked by Lauro Silva

Hey Chris & Community! :) What text editor are you using for the GoRails Forum post? Im following the episode [Markdown and Emoji with the html-pipeline gem](https://gorails.com/episodes/mar...


3 posts Gravatar

Suggestions for messaging

Rails • Asked by shakycode

I'm working on a couple different apps right now. One is new and one I'm refactoring some new functionality into. I'm looking to add messaging between users in both apps. I'm up in the air on ...


12 posts Gravatar

Problems Viewing Videos

Site Feedback • Asked by Frank Vinci

I am having a lot of problems watching the videos here the last couple of weeks. Multiple videos on different laptops and different browsers. The videos freeze constantly and I have to reload the...


6 posts Gravatar

Native Mobile Options

General • Asked by Brent C

I have a Rails 4 app that is fully responsive and works good on the mobile browser. However, I want to make native apps for it for iOS and Android. What are some recommended steps? Is Phonegap ...


7 posts Gravatar

Performance increase over group_by

Rails • Asked by arup rakshit

How can I write the below operation, being handled by _group_by_ Ruby method, in terms of DB specific query? ```ruby def list_users @search_by_options = [:age, :location, :department, :d...


1 post Gravatar

Pundit Policy and has_many through Pt. II

General • Asked by Ivor Padilla

Hey there, I decided to start another post although I read this one already https://gorails.com/forum/pundit-scope-and-has_many-through but I need to confirm that my query is on point. Here's...


3 posts Gravatar

Implement a hash tags like feature in rails

General • Asked by John Munyi

Hi , I have looking for an actively supported gem to implement a hash tag like feature that can easily be used as a metric in feedback that has a lot of text. I checked-out https://g...


8 posts Gravatar

Facets with Searchkick

General • Asked by Satchit Shenoy

Great job on the Searchkick tutorial! However, I'm really interested in faceted search for an application I'm building, and the documentation on the internet is not really good enough. Any ideas? T...


1 post Gravatar

Forum Series episodes ... no method error: undefined method

Rails • Asked by Miguel

I've been following along the Forum series of episodes, when I try to submit a forum post, I get an error. It seems that the controller has trouble assigning the user id to the current user. I thou...


8 posts Gravatar

How do I iterate over an array of nested hashes in a view?

Ruby • Asked by Premila Anand

I have an array that has nested hashes of months, years and amounts that I want to diplay in a table. My data is in this format: [{:month=>"January", :years=>{2017=>20, 2018=>100, 2019=>300}}, ...


6 posts Gravatar

Loop through associated records and deliver as csv

General • Asked by Sascha M.

Hi there, I've watched your CSV export episode and I'm using the exact same code to export the records to a CSV. I've got two tables: Orders and Sales. 1 Order has_many Sales and 1 Sale belon...


1 post Gravatar

Administrator creates user accounts with Devise gem

General • Asked by Nymweb

I have a project with Devise gem. I need to create a user with the admin account. If I am logged in with the admin account I can not enter the path / sing_up. How can I access this page?


7 posts Gravatar

How can I setup Cloudfront CDN for Rails App ?!

Rails • Asked by Anh Vy Nguyen Vuong

It's good to have CDN enabled to speed up rails app but how can I do that with Cloudfront ?!


19 posts Gravatar

How to display multi-day events in SimpleCalendar?

Gems / Libraries • Asked by Alan Kirk

Hi there, Not sure if i've missed something, but i'm not able to get multi-day events to show over the date range using SimpleCalendar. From what I've read on the Gem homepage, I've passed in...


3 posts Gravatar

Use a gem I created, that needs to remain private?

General • Asked by Nick McNeany

Hey Chris, First, thanks for all the great videos and for taking the time to answer all these questions! I want to make a gem for a front-end, Bootstrap spin-off, framework. I've watched your...


3 posts Gravatar

Pre-populate association for nested form

General • Asked by John Munyi

Hi so here is what i have : class Attendance < ActiveRecord::Base belongs_to :attendance_sheet belongs_to :user end class AttendanceSheet < ActiveRecord::Base ...


9 posts Gravatar

Likes routing error

Rails • Asked by Thomas Bush

I am trying to use the Likes tutorial to create Favs for locations, which are nested under stores. Here is the relevant route section ``` resources :stores do resources :locations do ...


2 posts Gravatar

Texteditor

General • Asked by Artem Kiryanov

Hello! Can yoy help me? I have Ruby 2.1.3 and Rails 4.1.7. I use gem ( https://github.com/spohlenz/tinymce-rails ) and I do everything as it says, but i when paste this code: <pre><%= tinymce %></p...


2 posts Gravatar

Limit CSV export by Day, Week and Month

General • Asked by Sascha M.

Hi there, is there an easy way to limit the results inside a CSV export to a specific time-frame, like day, week and month? Thanks!


4 posts Gravatar

Stripe Payments

Gems / Libraries • Asked by Corey Holmes

Hey, love the new Stripe video but I'm stuck on something. I am getting the error: uninitialized constant ActionView::CompiledTemplates::STRIPE_PUBLIC. It's having a problem with my meta tag whi...


2 posts Gravatar

How do I build a dynamic drop down menu in Rails with Simple Form?

Rails • Asked by Stephen Strange

I would like some help on how to build a dynamic dropdown menu with Rails Simple form. I'm really new to programming so any help will be appreciated. Many Thanks, SS Here is my Simple ...


5 posts Gravatar

How do I find the best place to store user videos and how to capture them?

General • Asked by Giorgos Psathas

I want to create an app which will provide to user the opportunity to capture from their PC (by using webcamera and Mic) series of videos and save them under his profile. My concerns/questions are:...


4 posts Gravatar

Single Table Inheritance: Good spot or not?

Rails • Asked by Brian Schwartz

I have two simple models I'm about to create in an existing Rails app. One is a `NAICSCode` which has the following attributes: `company_id`, `code`, `name`, and `description`, the other is `SICCo...


8 posts Gravatar

Creating & Installing SSL Certificate on DigitalOcean Ubuntu 14.04 VPS

Servers • Asked by Michael Stitt

Your [tutorial](https://gorails.com/deploy/ubuntu/14.04) on configuring a VPS on DigitalOcean for a Rails app is great! This came in super handy while I was creating mine! Can you explain to me...


2 posts Gravatar

Speed up videos

General • Asked by Chris Ma

Hi Chris, Not really a rails question, but I just wanted to see if you could add a video speed feature as I can go through your tutorials at half the time. Cheers, Chris


1 post Gravatar

refactoring polymorphic actions

General • Asked by Szilard Magyar

Hi Chris! I implemented the notification system based on your video with the partials. Works perfectly. I've got some problem though when user wanna check out the notification. When he/she clicks ...


3 posts Gravatar

Populate dropdowns based on selection

Javascript • Asked by Jay Killeen

I'd like to get people's thoughts on the best approach. I'd like to have a search ability where once a selection if made, the next dropdown box populates with only the available options from the...


6 posts Gravatar

Code Challenge idea

General • Asked by shakycode

Chris and I were talking about starting a challenge/kata exercise for the community in Ruby/Rails. Based off of the idea of [Underhanded-C](http://www.underhanded-c.org/), we could post a weekly, ...


4 posts Gravatar

AASM state based on variable

General • Asked by Wouter van den Beld

Hi, I am using AASM and i want to set the state based on the total_price of a purchase order. is this code below the way to go or can it be refactored. ```ruby before_save :check_budget ...


2 posts Gravatar

Show each users each post.

Rails • Asked by Peter Boomsma

I'm trying to create a page where all my users are listed, and every movie they've added to their account. My UserController index def def index @users = User.all if logged_...


3 posts Gravatar

let users edit their own posts

General • Asked by Erick Sitter

I currently have it setup to where only the admin can edit posts, but would like if the user can edit their posts but no other posts that were not made by them. Forum Posts Controller class F...


6 posts Gravatar

Importing datasets. Recommendations?

Databases • Asked by Brent C

I have a few datasets that I need to import into my rails app. They vary from 100 records to 5000 which will span across a few models with various associations. Q.1: I can cleanse the data prio...


1 post Gravatar

Hey how can I add "working days" to a task model and "working hours" to a shift?

General • Asked by Drilon Buzuku

Hey I would like to add "working days" to a task model and "working hours" on a shift model wich belongs to the task model. So that I can select on which days a task will be repeatedly done and a...


19 posts Gravatar

Structure Guidance - Multi Tenancy Authentication / Authorization

Rails • Asked by Dan Tappin

I while back I was playing around building an app where you had multiple tenants (Company Model) and a single login (User Model). I then created roles (Role Model) to link the users to the tenants....


12 posts Gravatar

Javascript frameworks videos?

Javascript • Asked by Brian Schwartz

Hey Chris, Just curious if you would plan on adding any videos using Angular, Ember or Backbone with Rails? Thanks!


5 posts Gravatar

Page Specific Javascript

Javascript • Asked by Michael Victor

I just came across this article that talks about a gem that allows you to implement cleanly space specific javascript. http://brandonhilkert.com/blog/page-specific-javascript-in-rails/ Howeve...


1 post Gravatar

Mailboxer: How to attach a file when starting a new conversation

Rails • Asked by Mehdi Mehrtash

I am using the Mailboxer gem. When creating a new conversation, the message that is created at that point is does not attach the file I am uploading. new.html.haml = form_tag conversations_path...


16 posts Gravatar

Sharing on social network

General • Asked by Christophe Estanol

What is the best way for the visitors of my page (not logged in) to share models data (for example articles and courses) on Facebook and Twitter. I have been looking for an answer without really f...


6 posts Gravatar

has_and_belongs_to_many associations

Rails • Asked by Lauro Silva

Im building an app where a `User` belogns to several projects. Is this a good approach to create a "join table" that just tracks which `Projects` are connected to which `Users`? Is the `Collaborati...


4 posts Gravatar

Pundit: How to apply the same policy to nested resources

General • Asked by Adrien Nhem

working with pundit gem. Is it possible to apply the same rule to nested resources? if show is not allowed in lecture_policy then show in lesson_policy should not be allowed too. ``` Lecture ...


2 posts Gravatar

Avoid devise automatic sign-in after email confirmation

General • Asked by Bruno Wego

After email confirmation, devise automatic sign-in users, how configure devise to avoid that? ```rb # devise.rb Devise.setup do |config| config.mailer_sender = '[email protected]' end ``...


2 posts Gravatar

lazy high charts gem

Gems / Libraries • Asked by John Munyi

Hi there, I have been tinkering `lazy high gem` trying to get charts up and running, it works well with hard-coded data into the chart but when I try passing data dynamically i cant make some ...


2 posts Gravatar

Devise: current_user not saving to @forum_post.user

Gems / Libraries • Asked by Erick Sitter

I'm currently having an issue when I create posts, I always seem to get undefined method "username" or "email", but when using current_user.username or current_user.email it will display just fine....


2 posts Gravatar

Backend and Frontend co-operation

General • Asked by Michael Victor

In our rails applications, I generally work on the backend (models and controllers) while another developer focuses on the (Views + JS magic). Generally he gets all the fields available from a m...


4 posts Gravatar

How to link the liked posts by each user?

General • Asked by Lauro Silva

I just finished with the [Liking Posts](https://gorails.com/episodes/liking-posts?autoplay=1) screencast. All good. I managed to create a User Profile. And now I'm trying to display the liked post...


3 posts Gravatar

How should I model this situation?

Rails • Asked by Chris Zempel

I need to store different metrics about various companies. These will be present for every company: * revenue * ebitda * cash * receivables * employees * debt each one has attribute...


3 posts Gravatar

Some good ways of seeding data in my app?

Databases • Asked by Karl Coelho

I need some seed data for my app. How do I seed Devise users, and always as images for Paperclip?


3 posts Gravatar

Using Microsoft ADFS with Ruby on Rails and Omniauth based on a example cast.

General • Asked by Dmitry Kolesnikov

Building a app that uses ADFS is tricky - maybe making a screencast would be a good idea. https://craig.io/using-microsoft-adfs-with-ruby-on-rails-and-omniauth/ there is a semi beta solution fo...


5 posts Gravatar

Should I use a gem like paperclip or carrierwave to handle PDF and docx uploads?

Rails • Asked by Drilon Buzuku

Hey guys, has anyone advice on this one? Are there maybe better ways to handle document uploads in rails?


4 posts Gravatar

Any one help in pointing to a resource or webcast which explains how to interact with Google Drive API

Gems / Libraries • Asked by Anand Duddella

I am very new to rails and trying to build an app which can interact with Google DRIVE Api V3. I have scaffolded a Rails 5 App and used Devise Gem along with Google OmniAuth2 to authenticate and re...


16 posts Gravatar

Freelancer? / Seeking freelancer?

General • Asked by Chris Oliver

Similar to the Hacker News thread, I thought we might start up a thread for anyone looking to hire a Ruby / Rails freelancer or if you're a freelancer looking for work. *Please lead with either ...


5 posts Gravatar

Set a start date for Chartkick / Highcharts combination

Rails • Asked by Stan Smith

This is driving me nuts. I'm trying to set a dynamic start date of 1 month ago for a line chart using Chartkick / HighCharts. But can't find the right syntax.


9 posts Gravatar

Refile S3, presigned, multiple files + Cloudfront - generating images via javascript

General • Asked by Dean Fields

Hello, I have followed along with both videos, but have come up with a little issue while attempting to generate a thumbnail within the success event. It seems to be automatically requiring the ...


22 posts Gravatar

How do i save a field in a separate table?

Rails • Asked by Alan Reid

Hi all, I want to save the brand_id i am creating in my users table how would i go about doing this? I currently have my code saving the brand. ```` def create @brand = Brand.new(brand_p...


10 posts Gravatar

Screencast Request: iOS / Android Adapter Example

Site Feedback • Asked by Patrick Berarducci

Hey Chris -- Thanks for all the great content. I've been enjoying it for quite awhile; you do a great job, really. I'd love to see a short tutorial on how to take a rails app or a portion of a ra...



7 posts Gravatar

Is there a well-liked solution for handing nested model forms?

Gems / Libraries • Asked by Rutul Dave

I am not sure what the consensus is on the best approach to handling nested model forms is. The solution in https://gorails.com/episodes/forum-nested-attributes-and-fields-for can work, but doesn...


2 posts Gravatar

ActiveRecord AssociationType Mismatch

Rails • Asked by shakycode

I have a Rails 3.2.21 app where I'm adding a simple form/collection_select field in my form. When selecting an object from the dropdown (or leaving it blank) I get the following error: ``` Act...


4 posts Gravatar

Missing partial error even though lookup context comes back as true.

Rails • Asked by Matt Taylor

I'm getting a missing partial error even though my lookup context check comes back as true. My partials is in `views/activity_feed/` and is named `_appointment_set.html.erb` ``` <% @activities.ea...


5 posts Gravatar

Using Devise in Consumer App

Gems / Libraries • Asked by rabin prithvi

I have two applications. One is Rails API consumer app and another is a legacy PHP one - which responds with JSON API. APIs are used for user registration and login. Can I use Devise for authentica...


2 posts Gravatar

EMAIL MANAGEMENT BACKGROUND.

Rails • Asked by Antonio F.

Hi, how could I manage emails in the background using devise gem in rails 5? P.S. you know if you can use the "devise-async" gem in rails 5? Regards.


3 posts Gravatar

Extending Rails flash

Rails • Asked by Jiri Prochazka

I have in *app/lib/action_dispatch/flash/flash_hash.rb* file this code: class ActionDispatch::Flash::FlashHash def my_method #... end end but when I call it in...


3 posts Gravatar

HTTParty and trycelery.com API

General • Asked by Edward Bishop

Ok. I have tried for 3 days and I'm not getting anywhere. I am building a small kickstarter style campaign module for several products that will be run through Celery. What I want to accomplis...


3 posts Gravatar

Updating a genre in a nested association

General • Asked by Wesly Mezarina

I've been asking a few question on scraping and nested association. Im running into another issue which is updating genres to each anime. I'm getting a list of genres, for example "Action, Romance...


5 posts Gravatar

[Performance] - Can I Still Refactor This Code?

Rails • Asked by Zulhilmi Zainudin

I'm building an API based Rails app and I've one endpoint to list down all active users account numbers and gold balance inside that account. The requirement is: 1. Take all active users (kyc...


4 posts Gravatar

What else would you add to the Stripe Subscriptions app to 'complete' it?

General • Asked by TWG General

Hi Chris, I was wondering what else you would need to include to ensure all situations are addressed to complete the Stripe Subscriptions application? For example, I'm assuming webhooks for when...


3 posts Gravatar

Action Cable vs Mailboxer?

General • Asked by Enrique Benitez

Differences and pros/cons between Rails 5 new **Action Cable** vs **Mailboxer** gem? What are your thoughts? :)


18 posts Gravatar

Simple newsletter sign up?

Rails • Asked by Gareth Gomersall

Hey Chris and all other members of this forum.... I'm trying to create a single page rails site, for a new app that i'm trying to build myself (it's called Nibli, and it's on nibliapp.com). I...


1 post Gravatar

Best way to render a page as a PDF

Gems / Libraries • Asked by Damon Delcoro

I have tried several methods including PRAWN to generate PDF's. It seem there must be a better way. What is you recommendation?


2 posts 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/f). I...


6 posts Gravatar

Update and validate multiple entries

Rails • Asked by Andre Zimpel

Hi friends I got a kinda tricky problem which I usually would do through a nested form, but since I'm writing an API which has some tricky associations I need something custom (I guess): Firs...


3 posts Gravatar

How can one setup a service booking app with time limitations?

Rails • Asked by Drilon Buzuku

Hey guys, how can one setup a service booking system where the customer can book services between 9am and 4pm on every monday and friday? Would you use the ice_cube gem to create timeslots and t...


4 posts Gravatar

Extend Sprockets to bundle mustache templates

Rails • Asked by Alex Musayev

Extend Sprockets to bundle mustache templates I'm trying to include some Mustache templates into the main JS bundle. The idea is to take `/app/templates/*.mustache` files, generate a JSON object...


2 posts Gravatar

Constant Map Filtering

General • Asked by Michael Victor

I have two models Product and Product Properties. So, I store the properties for products in the Product Properties model which is associated with another model Properties How can I implement a ...


1 post Gravatar

cancel actioncable connection for unauthorized users?

Rails • Asked by Matt Taylor

Followed the series on action cable notifications and setup the meta tag so that action would not try to connect if the meta tag was present. Here is my code. ``` $(document).on("turbolinks:loa...


2 posts Gravatar

Ransack undefined method path in Rails 4.2.1

General • Asked by shakycode

I'm working on a simple CRUD Asset Management app and I want to use Ransack. I think I have this setup properly in my view and controller but each time the index view is hit I get the exception: ...


2 posts Gravatar

Routing Error No route matches [POST] when submitting ActionMailer

Rails • Asked by Ben John Bagley

I have created a form but I'm having issues submitting the form, it's not getting the right route, I'm sure this is a simple fix, I'm just not seeing it. Here are the relevant files: `new.htm...


5 posts Gravatar

DRY Validations for Similar Models

Rails • Asked by Sillico

In my app I have restaurants which have a name, address, state, zipcode, country, and some other stuff. These restaurants have many locations, and each location belongs to a restaurant. The locatio...


3 posts Gravatar

Check & Remove old Ruby & Rails Version?

General • Asked by Menj Villalobos

Hi, I need your help on how to check ruby version installed on my system and same as rails. And maybe remove them if necessary if. Thanks


2 posts Gravatar

How to I Architect my application?

General • Asked by Aniket Rao

So I have been tasked with a project where I have 3 entities, say a retail shop, wholesale shop and a manufacturer. Each have their own schemas (each shop has its own subdomain). All three entities...


13 posts Gravatar

What are your goals for 2017?

General • Asked by Alan Reid

Hello all! Hope you all have a great holiday and heres to an awesome 2017 to you all :) One of my goals for 2017 is to learn new stuff. One of the things i want to do, is to expand my understa...


5 posts Gravatar

Episodes Source Code

Site Feedback • Asked by Rene Escobar

Is there any way you can provide us with the source code for the episodes?


4 posts Gravatar

problem with like link in nested resource

Rails • Asked by Pablo Seo

Hi Chris im doing the episode 'liking posts' i have difficult to do with deep nested resource, my actual nested resources looks: A. Routes: ```ruby resources :users do resources :...


10 posts Gravatar

Links not working on production server

Servers • Asked by Edward Bishop

I'm at a loss. After finally successfully deploying using Capistrano, and finally figuring out why my assets were missing, I have another issue. I have a link that point to static pages (contact)...


5 posts Gravatar

integrating analytics

General • Asked by Szilard Magyar

Hi Chris! I see GoRails is using segment.io for analytics. Could you recommend me a good resource on integrating segment with GA and mixpanel? There are too many approaches like javascript versi...


3 posts Gravatar

Stripe EU Vat

General • Asked by Jacob Hedengren

Hi! Thank you Chris for your great videos. I live in Sweden and I'm trying to set up a stripe monthly subscription on my site and need to collect the correct vat from my users which I'm required...


4 posts Gravatar

My first 3 hour project for job application

General • Asked by Rails Addict

Hello, I made it past the phone screening and the next stage is that a robot will email me a project and I have a three hour window to complete it and then email them the results. This is for a...


2 posts Gravatar

Creating nested attribute with two parent attribute.

Rails • Asked by Ariff Munshi

Hi, Been going round in circles for a day or so but still can't seem to find a solution for this. I have project management chat app that on sign up, you create the project and the first chat me...


11 posts Gravatar

Why my rails production server reaches to 100% CPU usage and making app to be unresponsive?

Servers • Asked by Srinivasa Varma

Hi My rails app production server CPU usage sometimes reaches to 100% and making app to be unresponsive. We are using Ubuntu 16.04.1 LTS server and configured Rails app along with Nginx and pas...


12 posts Gravatar

How to make form fields to display placeholder text?

Rails • Asked by Adrian DeGus

I'm working on a project management app that is organized into 3 panes: Project list | Task list | Task details views/_sidebar: has a form to create projects projects#show: has a form to cre...


3 posts Gravatar

[HATCH] - Deleting separate applications on the same server?

Databases • Asked by Lauro Silva

I've been deploying several toy apps on the same server, but after I'm finished with them I would love to easily be available to delete them using Hatch's interface, instead of having to SSH into t...


4 posts Gravatar

Create a welcome page with a tour/get started

General • Asked by Francisco Quinones

Hi, I was thinking of a way when the user login for the first time they get redirect to a welcome page where they take some steps into maybe a tour or fill some important fields to getting started....


5 posts Gravatar

Subdomains

Gems / Libraries • Asked by Jon Moss

Let's say I have a scaffold called 'blogs', and blogs have an attribute called 'subdomain'. I want to have each blog be hosted at a subdomain; let's say I have a blog with a subdomain of 'gorails',...


1 post Gravatar

how to create in db this hash with Model.create

General • Asked by sacko idriss

```"livraisonlog"=>[{"vente_id"=>"3", "type_liv"=>"L", "produit_id"=>"57", "qte"=>"4.0"}, {"vente_id"=>"3", "type_liv"=>"L", "produit_id"=>"66", "qte"=>"5.0"}, {"vente_id"=>"3", "type_liv"=>"L", "p...


1 post Gravatar

Colorbox & Turbolinks load

Javascript • Asked by Thomas M

Hello, Rails 5.1.0 & Turbolinks5 & Jquery3.1.2 here I'm trying to make jQuery Colorbox works with dynamicly loaded elements (using ActionCable) with no luck. With the implementation below,...


3 posts Gravatar

Deploy Rails guide confusion

Rails • Asked by Anthony Candaele

Hi, I'm deploying my Rails app, using this website's Deploy Rails guide. Something is not really clear, at the end of the guide, under the section 'Adding The Nginx Host' it says: "Ope...


8 posts Gravatar

Import CSV data using RubyZip and Postgresql COP

Gems / Libraries • Asked by Jay Killeen

I've checked out the videos on importing data to your rails app. Very timely as I am deep into this feature bringing data from all our legacy systems into my rails app. My issue is I am importin...


7 posts Gravatar

How to setup SSL with a rails app

General • Asked by Francisco Quinones

So I have a ssl certification that I want to apply to my rails app. Im using puma on Heroku.


4 posts Gravatar

CSV Import

Ruby • Asked by Sascha M.

My question is about this Episode: https://gorails.com/episodes/upload-csv-form The CSV Import works fine (I'm using the exact same code actually). My 1. Question - How can I define an alias ...


4 posts Gravatar

Devise User Follow System

Site Feedback • Asked by Samuel Janes

Can you make a Follow system with devise that updates via ajax? Thanks!


3 posts Gravatar

2Checkout in Rails

General • Asked by Yashi EL

HI Chris, I'm new to here and new to rails. i saw your screencast about stripe payment gateway, i learn lot from that video.. i need to ask for favor. could you please make another screencast ab...


1 post Gravatar

On Go Rails do you use any background workers for Stripe processing?

General • Asked by Lance Williams

I'm trying to figure out if I should move some of the stripe payment processing and invoice lookups etc.. to background jobs. Any suggestions for a simple membership type site? Here are a coupl...


3 posts Gravatar

Coffeescript Instantiation

Javascript • Asked by Chris Zempel

I've got a bunch of images thumbnails in an admin area. Wherever one appears, I'd like to be able to click on it, open up a modal with a form, and let the attributes of the image be edited from tha...


7 posts Gravatar

How do I implement a model association that when changed older records are not affected

General • Asked by John Munyi

Here are my models (User , Project and Task) A user has many projects , a project has many users , A project has many tasks and a tasks belongs to a project , a user has many tasks and a task belo...


19 posts Gravatar

I'm lost and can't find the way out

Rails • Asked by Andrew Fomera

So I'm in the middle of this project and I thought I could figure it out on my own, but it appears I am in over my head here. So any advice/help you can give me would be great. Basically I'm tr...


11 posts Gravatar

Is it possible to incorporate React + Redux into existing Rails application?

Javascript • Asked by Ken Hibino

I have been working on creating a Medium clone to learn Ruby on Rails. It started out as just a plain Rails app but as the app evolved I started using React in the front end (using react-rails gem)...


3 posts Gravatar

After adding the activeadmin gem, my previous style changed, How can avoid this?

Gems / Libraries • Asked by Larry Qu

After adding the activeadmin gem, my previous style changed , How can avoid this? Previous style is : ![previous style](http://calmops.com:83/down/previous-style.png) After adding the...


10 posts Gravatar

Deploy Rails

Servers • Asked by Artem Kiryanov

Hi . Can you help me ? When i start : cap deploy production, i have errors: 1. rake stdout: Nothing written 2. rake stderr: syck has been removed, psych is used instead How can i resolve them?


8 posts Gravatar

Just sharing: Squash your migrations

General • Asked by Roman Storm

I've gone into problem when my test db is using sqlite and I use postgres in prod Sqlite doesn't have `inet` attribute like postgres and I went into some old migration that I don't use anymore. S...


5 posts Gravatar

Managed hosting

Servers • Asked by Beau O'Hara

Hi there, I am curious what others a doing for large scale managed hosting. Currently we managing our own AWS and I would like to hand those duties over to a 3rd party. I am looking at Heroku but...


7 posts Gravatar

Refile uploading via rails console

General • Asked by Brian Schwartz

So I'm using Refile and I'm trying to migrate some existing data that I need when I seed the database (migrating to Refile from existing solution and need to keep existing data). When I try tes...


5 posts Gravatar

dealing with authorized parts in fragment caching

General • Asked by Szilard Magyar

I have a facebook/disqus like news feed in my app. Every action handled via AJAX on the posts index page. I have hard time figuring out how to do the russian-doll-catching when there are authorized...


9 posts Gravatar

how scrabe data every day

General • Asked by corrado tuccitto

how can I schedule to gather data with nokogiri and store it(only what has changed) in a db every morning?


4 posts Gravatar

GroupChat ActionCable Part 6 coffee and Chrome compatibility

General • Asked by Rob Sturcke

Running into a strange error, everything works perfectly fine in Safari/Firefox. However, when launching in Chrome functionality completely halts after adding ```notifications.coffee```. Is there...


7 posts Gravatar

why destroy action is called two times.

Rails • Asked by naveen kumar

my destroy action def destroy @owner = User.find(params[:id]) @owner.destroy respond_to do |format| format.html { redirect_to root_path } format.js {} end my index page de...


4 posts Gravatar

Switch state of boolean field

General • Asked by Benny Maas

Hi, on my index page i want to place a button for each record where i can switch the state from active to inactive or from inactive to active. the button should change without refreshing the pa...


6 posts Gravatar

Multi tenant best strategy

Gems / Libraries • Asked by Giancarlo Corzo

Hi, I'm creating a multi tenant application using the apartment gem based on the video about multitenant here in gorails. The model I choose was the Account instead of Users so I can have sev...


3 posts Gravatar

Orders and Order Items

General • Asked by Michael Victor

I have 2 models, Orders and Order Items. I want the user to be able to add any number of items to an order in the view. How can I structure a form so that I can iterate over the order items or i...


4 posts Gravatar

How do I avoid having duplicate rows in a has_many :through table?

General • Asked by Félix Landry-Audet

I have a Center model and a Department model. The linked :through the Local model. However, I want to avoid inserting the same match twice in the Local table. Do I use a validate statement or th...


10 posts Gravatar

ReactJS with Rails

Javascript • Asked by Tony Brown

I'd love to see a series on a **_real world_** app using **ReactJS** with Rails API.


2 posts Gravatar

Updating Nested Form / Model Attributes

Gems / Libraries • Asked by Dan Tappin

I have a nested form on a Devise signup page. The user signs up and then they also fill out their company info (Name , Address etc.). My User and Company model are associated through a Role model...


18 posts Gravatar

Can you make an episode on Recurring Events- recurring_select + ice_cube

Site Feedback • Asked by Olsi Gjeci

Can you make an episode on this! I've gotten to the point of adding recurrence rules, but having trouble generating and showing events that are recurring on future dates the same way they appear r...


9 posts Gravatar

Searchick filter with scope

Gems / Libraries • 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...


3 posts Gravatar

Pundit scopes

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


3 posts Gravatar

How would you implement a feature like Youtube's "watched" feature.

General • Asked by James Ferguson

Hi Chris, I'm interested in implementing a feature similar to Youtube's watched feature. Where after you've watched a video, a small semi transparent overlay is placed over the video thumbnail ...


1 post Gravatar

Category filter implementation (perhaps with search)

General • Asked by Szilard Magyar

Hi Chris! At the moment I have product and industry models with has_many :through associations, and would like to list the products based on the industries. I'd like to create a category (in my...


5 posts Gravatar

Non-rails, block ip address from nginx without logging to error.log?

Servers • Asked by Brian Schwartz

Posted this to serverfault too, but I'm still stuck: I have a server that keeps trying to brute force hack via xml-rpc post on a wordpress site (I know, I know). I've blocked the ip address in ...


2 posts Gravatar

Survey - adding options though nested models

General • Asked by Chris Ma

Hey guys, a while ago, I tried to follow a railscast tutorial(notably http://railscasts.com/episodes/197-nested-model-form-part-2?view=asciicast) on nested models where i was trying to build a sur...


3 posts Gravatar

Bundle issues

Rails • Asked by Dana Nourie

Hi, I'm starting the forums tutorials, and I keep get this bundle error. I've tried bundle update and get the same thing: Bundler could not find compatible versions for gem "sprockets": In...


3 posts Gravatar

Forum_posts edit coming up as nil

General • Asked by Erick Sitter

ActionView::Template::Error (First argument in form cannot contain nil or be empty): 1: <%= form_for [@forum_thread, @forum_post] do |f| %> 2: <h3> Reply to thread </h3> 3: <div ...


1 post Gravatar

No action "edit" in forum_posts_controller

General • Asked by Erick Sitter

Forum_Posts Controller class ForumThreads::ForumPostsController < ApplicationController before_action :authenticate_user! before_action :set_forum_thread def create @forum_post = @...


10 posts Gravatar

Is there a better way to simplify this?

Rails • Asked by Alan Reid

Hi again, I want to know if there is a better way to get a list of categories which only have products. I have tried to do [email protected] = Category.where(category_type: 'product').order(name: ...


9 posts Gravatar

Environment setup: iTerm, dotfiles etc

General • Asked by dichaba rammopo

Hi Chris Would you be willing to share your dotfiles? Your terminal seems so clean. Why iTerm? Do you have git information integrated into the prompt? What do you think of [YADR] (http://skwp...


3 posts Gravatar

Dynamic select boxes with Rails 4

Javascript • Asked by John Munyi

Hey there I am trying out a dynamic select box with rails 4 and I am stuck on where to put the js code because the form exists in a nested form. So should the code go in the js file for the form ac...


4 posts Gravatar

How return has_many with array instead of object

General • Asked by Bruno Wego

Have a way to a "has_many" return a array instead of object? ```rb class UserSerializer < ActiveModel::Serializer attributes :id, :name, :nickname, :image, :roles has_many :roles end ...


3 posts Gravatar

Admin for the specific case

Gems / Libraries • Asked by Jan Lachowicz

Hello, I have a problem and just missing the solution. In my project I have user accounts made in devise that are connected to **Case** model through **Work** model (with *is_admin* boolean attri...


17 posts Gravatar

Ransack Scoping issues

General • Asked by alexander kehaya

Hey everyone, Just posted this question to stack overflow but thought I'd give it a try hear. I've been trying to figure out how to scope ransack searching for a couple of weeks but haven't figured...


3 posts 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?


3 posts Gravatar

Post "Reaction" Feature

Site Feedback • Asked by Menj Villalobos

Hi Chris! Is it possible for you to add or create screencast on how to integrate this cool "reaction" features? :) Thanks! ![](http://thumbnails117.imagebam.com/52572/506b92525712336.jpg)


10 posts Gravatar

Multi-event .ICS file generation?

Rails • Asked by Brent C

Any suggestions for generating an .ICS calendar file containing multiple events from my models? Any experience with Gems(iCalendar vs Ri_cal), or anyone know of good blogposts, etc. detailing the ...


2 posts Gravatar

Dealing with Recursive Models

General • Asked by sid d

User wants to search for classes nearby according to date similar to [classpass](http://joliepagaille.com/wp-content/uploads/2014/11/Picture-1.png) ### Backend Form fields for creating class by...


3 posts Gravatar

How do I make an app to get a video by url from youtube download it / process it/ and uploaded to a local db?

Gems / Libraries • Asked by emil mircea

I liked the shrine tutorials and would like to use that as an upload to local disk solution. I also found a gem called youtube-dl (https://github.com/layer8x/youtube-dl.rb) to help download from Y...


6 posts Gravatar

How to add records to has_many :through association

Rails • Asked by Wesly Mezarina

I have three models called Site, Model and ModelSite as shown below. If i create a new model_site i can choose a site and model to save which works good but what i need help in is how can i choose ...


4 posts Gravatar

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


6 posts Gravatar

Stripe gems: Koudoku or Payola

Rails • Asked by Mark Radford

Has anyone used either https://github.com/andrewculver/koudoku or https://github.com/payolapayments/payola ? If yes, are you able to give any feedback regarding ease of use, ability to customise, e...


1 post Gravatar

Add Students to a class in a HABTM relationship !

Rails • Asked by John Sanderbeck

I have an app designed that I have classrooms and I want to "enroll" students in the class en mass. For example I want to be able to search by name and either add by an enroll or add button or a c...


2 posts Gravatar

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


12 posts Gravatar

Hosting static images in subdirectories of Public on nginx

Servers • Asked by Brian Schwartz

Hey Chris (and others), Switched to nginx from Apache and following the deploy guide for Ubuntu 14.04. My app (which is 3.2.X and Ruby 1.9.3) no longer serves the static images I store in public...


8 posts Gravatar

How do I configure paperclip with capistrano?

Servers • Asked by Cristian Georgescu

Hi, I deployed using the "Deploy Ruby on Rails" guide. However I paperclip attachments no longer work in production. Got the below error: Failed to load resource: the server responded with a...


2 posts Gravatar

How to compare and write conditions on active record field "time"

General • Asked by sid d

```ruby Fpclass(id: integer, name: string, start_time: time) Fpclass.first.start_time # 2000-01-01 01:01:00 UTC ``` I'm having problem with comparing time field while fetching result...


4 posts Gravatar

ActiveRecord

Tips • Asked by Sarah

Rails console: Memoization seems to be a pretty awesome resource.


2 posts Gravatar

How do I read an incoming webhook post in Rails 4.2

General • Asked by Aaron Mills

I have something along the lines of this: case request.request_parameters.keys.first when "new_subscription_notification" when "canceled_subscription_notification" deactivate_subscri...


5 posts Gravatar

RSpec w/capybara vs Mini Test

Testing • Asked by Drilon Buzuku

Hey guys, what are your thoughts on RSpec vs Mini Test. Which one do you use and why? Cheers, Drilon


1 post Gravatar

How do i show a specific book and show all the activity that a uniq user provided with the public_activity gem?

General • Asked by Wesly Mezarina

I'm able to show a stream of activity for each user in their profile. What I'm trying to figure out is how i can have a book show one time with the activity that a specific user provided on the sid...


7 posts Gravatar

Is anyone using Rails 5 yet?

Rails • Asked by Alan Reid

The setup guides on the site recommend using Rails 4.2.6. I'm curious to know if we should be using Rails 5 now as it's been out for almost a month? Cheers


2 posts Gravatar

Issue with devise

Rails • Asked by Alan Reid

Hi all, I am getting this error when i reset passwords - it throws to this error message. It still sends out the email, and allows me to reset the password. Any ideas whats causing this so i can f...


16 posts Gravatar

Using React

Rails • Asked by Melanie

I'm trying to learn how to use react in my rails 5 app. I've just finished following Kenny Hibino's you tube series for his medium clone. He used react-rails gem, but then realised he wanted to...


6 posts Gravatar

Excluding Assets Pipeline gems while running Rails in production

Rails • Asked by Alex Musayev

I've been thinking, since assets compillation suppose to be performed during production deployment, it is irrelevant to make Bundler to require `uglifier`, `sass-rails`, `therubyracer` and may be s...


4 posts Gravatar

How do I populate form control with data from database ? the RoR way..

Rails • Asked by Nahwin Rajan

Hi there, this is very basic thing but How do I populate controls in my form with data from database ? For example let say I want to create a Invoice / Order of items from my product list. I...


1 post Gravatar

Turbolinks 5 issue when clicking back

Rails • Asked by Adam D

Hi all, I'm upgrading my rails 4.2 app to use turbolinks 5 as per the gorails ep but I've ran into a problem. I'm using zurb foundation framework with offcanvas menu when I open the menu and ...


4 posts Gravatar

Any good tutorials on using rbenv?

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


3 posts Gravatar

Get Paperclip file before save

Rails • Asked by Agung Setiawan

Is it possible to read the file, in my case image file, inside Paperclip::Attachment before the file is saved? I need to send the image to an api first and then from the response it's given if ...


3 posts Gravatar

Nofications screen cast

Site Feedback • Asked by John Munyi

Hi Chris , I am following the notifications screen here : https://gorails.com/episodes/in-app-navbar-notifications?autoplay=1 all is well no errors but when i create a post the notifications a...


39 posts Gravatar

How do I allow a user to make multiple payments on one booking using Stripe?

General • Asked by Mike Whitehead

I'm building an events app using Rails and Stripe to handle payments. I've used javascript for my booking page in order to allow a user to book and pay for multiple spaces rather than just one at a...


7 posts Gravatar

macOS sierra working w/ Ruby / Rails / RBENV?

General • Asked by Brian Schwartz

Curious if anyone has tested it? Don't want to upgrade until I know everything in my stack works correctly without a ton of pain. TIA


6 posts Gravatar

Screencast Request: Authorization with ActionCable

Site Feedback • Asked by Drazen Mokic

A cast about how to do authorization with ActionCable. Example is a Chat with multiple chat rooms and messages should only be sent to rooms / people who have access to the given chat room.


4 posts Gravatar

Capistrano deploy removes tables from database.

Databases • Asked by Peter Boomsma

I use capistrano to deploy my Rails app to my VPS, but after every deploy when I visit my page I get an error. The log says: I, [2014-11-04T08:20:16.659289 #12482] INFO -- : Started GET "/" f...


10 posts Gravatar

data consistency for invitation registration

General • Asked by Szilard Magyar

Hey! At the moment I have a user and a product table and products are created by users. So the user can create his own product he is working on. User `has_many :products` and `product belongs_to...


4 posts Gravatar

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


11 posts Gravatar

Best way to create or save a record (with associations) as a template

General • Asked by Todd Quillen

I'm curious as to what people think is the best to create a new record, or save an existing record... as a template. The template would be used as a starting point to duplicate that record easily ...


2 posts Gravatar

Multi select form & DB search

General • Asked by Sascha M.

Hi there, I want to allow a user to select multiple brands and teams in a select form field. I am using the user's input to create CSV through running a query. So far I only can query single...


2 posts Gravatar

One form, two separate controllers, created at once.

Rails • Asked by Masud Hossain

I'm trying to create a sign_up form where the user will choose his email + password AND and Article at the same time as creating a user account. So assentially, one form will create a new Use...


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


3 posts Gravatar

Reoccurring events with simple_calendar and ice_cube

General • Asked by Dan Tappin

I am developing a Rails app that has a `Task` model. It's like any basic task tracking system where you can set some attributes (name, activity, status, priority etc.) and a due date. For my syst...


4 posts Gravatar

Deploy Multiple Rails Apps to Same DigitalOcean Droplet?

General • Asked by Michael Stitt

I've used your guide to [deploy a Rails app](https://gorails.com/deploy/ubuntu/14.04) to a DO droplet -- which was extremely helpful! However, now I'm at the point where I'd like to take advantage...


5 posts Gravatar

Searchkick search_data not working

Gems / Libraries • Asked by Andrew Quinn

I'm playing around with elasticsearch and searchkick, but I can't seem to get search_data working. Searchkick seems to ignore it all together. If I only put one attribute in, it still searches o...


3 posts Gravatar

How to know if the user is logged in, in a mobile app.

General • Asked by Isaac Ben Hutta

Hey guys, I'm trying to figure out how the user authentication works with mobile apps that consumes the Rails API. I know I can send a POST request to the server to register the user and then gene...


7 posts Gravatar

Token Auth API with Devise

Gems / Libraries • Asked by Michael Stitt

I just watched your screencast on using Devise for user authentication and learned quite a bit. However, I not only want to create a web app but I'd also like to provide a JSON API as another way ...


3 posts Gravatar

Updating Forum_Posts getting routes error

General • Asked by Erick Sitter

app/views/forum_posts/_forum_post.html.erb <%= div_for @forum_post do %> <div class="pull-avatar-left" style="padding-right: 20px; padding-bottom: 10px;"><%= image_tag forum_post.user(:size => ...


4 posts Gravatar

Tagging Posts(Or whatever) in rails without any gems

Site Feedback • Asked by Samuel Janes

I've been creating a test app for a couple of weeks know, and want to have a tagging system. It would also be cool if it was polymorphic, so multiple models could have tags. Thanks!


4 posts Gravatar

User Badges Features

Rails • Asked by Menj Villalobos

![](http://117.imagebam.com/download/eXSFSJSayQIw0zfeN6KwIg/51997/519965161/Screen%20Shot%202016-12-13%20at%2012.21.32%20AM.png) Hi @chris! Is it possible for you to create a screencast with t...


1 post Gravatar

How do I get devise to use my custom routes inside of the authenticate_user!

Rails • Asked by Alan Reid

I've declared custom routes in my app for a few of the devise actions, they are as follows: ```` devise_scope :user do get 'signup', to: 'devise/registrations#new', as: :signup get 'log...


4 posts Gravatar

First argument in form cannot contain nil or be empty

Rails • Asked by Nathan La Barbera

Alright everyone, I would greatly appreciate your help solving this problem. Here is what I'm attempting to do; I have an articles controller and all the related views to create new article posts. ...


3 posts Gravatar

Everyone's Been Bitten Before - Whitespaces/Unwanted Characters in User Input

Rails • Asked by Nick J

Hey all! I've got an interesting question, and I'm sure you're all handling it in different ways. I know there are plenty of ways to tackle this problem, so I was interested in what everyone's d...


5 posts Gravatar

Problem associating nested resource with Devise current_user method

Rails • Asked by Adrian DeGus

I need to assign the current_user ID to all new projects, tasks and comments created in my app. I got projects and tasks working fine, but for some reason comments are giving me trouble. Here's ...


3 posts Gravatar

How do i create another table when a user signs up?

Rails • Asked by Alan Reid

When a user signs up, i ask them for their company name so i can then associate that user with a company. How would i go about doing this? I am using devise, so somehow i will need to store the com...


1 post Gravatar

How Do I Search Against Records Saved In Memory, and Not the Database?

Rails • Asked by Steve Polito

# Problem I have an event that starts Jan 1, 2017 and repeats every day until Dec 31, 2017. If I search for an event (using [ransack](https://github.com/activerecord-hackery/ransack)) that starts ...


4 posts Gravatar

Best strategy for downloading multiple files from S3

General • Asked by Justin Miller

Im working on a rails app where Users can create a “project”. Project, has many datafiles. Users upload multiple files direct to Amazon S3 (im using carrierwave). I'd like Users to have the abi...


2 posts Gravatar

Pundit Scope and has_many through

Rails • Asked by Wouter van den Beld

Hi! I can use a little help to get on the right track. I have 3 models ```ruby class User < ActiveRecord::Base has_many :associations has_many :items, through: :associations end ...


3 posts Gravatar

How would you improve these db's and associations

Databases • Asked by Shaun Fahey

Database Structure Hello people. I have my first proper paid Rails project to start soon, so I’ve been thinking about the database and the associations. The two links below are the databases...


4 posts Gravatar

Tracking Rails App Usage with Analytics

Rails • Asked by Jay Killeen

Hi I notice this site uses Google Analytics to track usage. Is that the standard when it comes to tracking your rails apps? I know it is generally pretty standard in the case of my websites but ...


2 posts Gravatar

Testing Turbolinks 3 partial replacement

Testing • Asked by Patrick Berarducci

Hey Chris (and everyone else) - Have you played around much with Turbolinks 3 partial replacement? (Chris, I wathed your livecoding segment; was great, thanks.) I'm using it with Rails 4.2.5, and...


5 posts Gravatar

Build a Devise Model in another controller

Gems / Libraries • Asked by Roman Storm

Lets say we have a Company model which accepts_nested_attributes_for User (devise Model) How do we Save both a company and User model having that a Company has_many :users and a User belongs to ...


7 posts Gravatar

Can I move parts of Shrine config to environments?

Rails • Asked by Michael Horton

I am using Shrine as you described in your *Direct File Uploads to S3* episodes. It works fine, although I had to make a few minor tweaks to suit Bootstrap 4. One thing is troubling me: all files a...


1 post Gravatar

Multi tenant with different template (View)

General • Asked by Oyewole Samuel

I've ask this question once but not clear on implementation, i've a multi tenant application using different template (View). Every tenant required to setup and choose template from setup. after th...


10 posts Gravatar

Updating sort_index attr on a collection of models

Rails • Asked by Sean Washington

Hey there! I've got a collection of models (Product) and each product has an attribute called `sort_index` that allows the store owner to set a specific order for their products. The UI allows t...


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


1 post Gravatar

How can i tell to devise to look at some other views?

Gems / Libraries • Asked by Stefan Dabizljevic

Hey i have some problem with devise. I already created devise model for User and after that i run command rails g devise:views without user at the and. And now i decided that i must to have couple ...


6 posts Gravatar

Question on ActionCable Group Chat part 4, development.rb fix for redis

General • Asked by Rob Sturcke

Saw in the comments the fix for ```(REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)``` however I added the following to my ```development.rb```: ``` config.action_cabl...


8 posts Gravatar

Re: In-App Navbar Notifications work on page load but not page change

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


2 posts Gravatar

An other deployment question

Servers • Asked by Romain Nim

Hello everyone! I'm new to Rails (and at coding in general) and english is not my mother tongue, so I might say clumsy stuffs, so please bear with me :D I'm finally ready to launch my first a...


4 posts Gravatar

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


2 posts Gravatar

rbenv: 2.1.2 is not installed or not found

Servers • Asked by Peter Boomsma

I'm trying to deploy my local Rails app to my Digital Ocean VPS using the GoRails guide > https://gorails.com/deploy/ubuntu/14.04 But I'm running into a error when I want to deploy: cap p...


4 posts Gravatar

SimpleMDE & RedCarpet

Gems / Libraries • Asked by Matt Taylor

So i have set up my forum with simpleMDE and i'm using RedCarpet to parse the markdown. Everything works great except when it parses the markdown, it adds extra set of `<p>` tags before and after m...


1 post Gravatar

How do I add multiple attachments to Mailboxer?

Rails • Asked by Mehdi Mehrtash

I am using the Mailboxer gem. I have enabled multiple file uploads for the attachment field. What is the best way to set up my controller so it saves all the attachments? Would making a new model c...


4 posts Gravatar

Other intermediate-advanced ruby/rails websites?

General • Asked by Boris Baskovec

Hi, I don't know if it's allowed here, to talk about other resources to learn Rails and ruby, but I'm looking for more intermediate-advanced guides and/or screencasts that are up-to-date I'm ...


2 posts Gravatar

How to build options on select tag with VueJS?

Javascript • Asked by Dmitry Amelchenko

For example, let's move to episode "using VueJS for Nested Forms in Rails" and adding model called Position, which association with a Player (belongs_to). And how to implement select tag for choos...


2 posts Gravatar

Use datatables like handsontable

General • Asked by Wouter van den Beld

Hi, I would love to see a episode that explains the use of json/ajax and load and save back data back to the server. For example i want to use handsontable (http://handsontable.com/) but i cant ...


6 posts Gravatar

Styles not rendering

CSS • Asked by Miguel

Hey guys, So I'm following [a tutorial](https://www.youtube.com/watch?v=70Pu_28yvdI&t=4025s), and around the 1 hr mark, he starts adding the styles. When I tried to reproduce it, it would not r...


1 post Gravatar

How do I create a Zapier integration with a rails app?

Rails • Asked by Chris Collinsworth

I've read a lot about this and I understand that it involves REST webhooks, but I'm struggling to get it to actual work. I'm not sure how to actually get my app to tell Zapier that something has be...


2 posts Gravatar

Is it possible to manually mark as watched an episode?

General • Asked by Vincent Robert

Hi Chris. Would it be possible to add a feature on GoRails in order to manually "mark as watched" an episode? When I randomly select an episode to watch, I would like to list only those that I ha...


2 posts Gravatar

Bonsai vs AWS Elasticsearch?

General • Asked by Jeramae Bohol

Any recommendation?


5 posts Gravatar

Help needed on how to create spatial indexing

General • Asked by sid d

Presently i have a list of the places what i've looking for and latitude / longitude numbers for them and i come up with somewhere about spatial indexing to search for nearest locations within my ...


3 posts Gravatar

How do I give Users the option of either selecting from a dropdown menu or inputting their own and adding it DB for other users

Rails • Asked by Omar Khedr

I apologize for the newbie question. But, I've been trying to create a special type of association and all my efforts have been failing. I would like to give users the ability to select their home ...


11 posts Gravatar

has_many :through association woes

Rails • Asked by Adrian DeGus

I have a has_many :through relationship between a few models that *almost* works. My goal is to allow users to be assigned to projects and/or tasks. Everything seems to work except user_id's are...


1 post Gravatar

rails vs node db transactions

General • Asked by Szilard Magyar

Hi, I am playing around with node.js and see promises everywhere even with db transactions. I was wondering why it is so different from rails. For instance: var db = require('mongodb-...


5 posts 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 < Act...


3 posts Gravatar

Autoloading models not working

Rails • Asked by Giancarlo Corzo

Hi, I have this model structure ``` /models /survey /questions question.rb survey.rb ``` I have used this autoloading in my application.rb so I don't have to deal with mo...


3 posts Gravatar

ActionCable Part 3: can't write unknown attribute `user_id`, what am I missing?

General • Asked by Rob Sturcke

Having some trouble figuring out what I'm missing with submitting a message in the chatroom, I get the error for my ```messages_controller.rb``` saying that ```can't write unknown attribute `user_i...


7 posts Gravatar

Devise redirects to /users when there is an error editing profile

Gems / Libraries • Asked by Alan Reid

I would like to know how i can change the redirect path so that when my editing a user fails it redirects back to `users/edit` and not to `/users`. To replicate this i am entering a duplicate em...


4 posts Gravatar

How Do i add an "Are You Sure?" button in my update controller

Rails • Asked by Neil Patel

Hi I want add a pop up button that says "Are you sure" when the user clicks on submit ? if it was a destroy mehod it would be something like this method: :delete, data: { confirm: "Are you sur...


4 posts Gravatar

How about an episode on zero-downtime deployment?

General • Asked by Daniel Weaver

I have a Rails app on Heroku running on just 2 web dynos (Standard type). I'd like to know how best to ensure uninterrupted access to the app for my users while also allowing me to deploy any ti...


2 posts Gravatar

Advanced management (DEVISE) profiles.

Gems / Libraries • Asked by Antonio F.

Hello Chris, I have the following problem, i can not separate the management of the profile to "devise" below will list how I would manage profiles: Edit User Profile (ex. http://localhos...


1 post Gravatar

Rails 5.0 - How to implement in-place editing without using best_in_place gem

Rails • Asked by Mike Whitehead

I'm building an Events site using RoR which I've just upgraded to v5.0.1 (not moving to 5.1 just yet). My events show page has a comments section at the foot of the page which, so far, only has a c...


2 posts Gravatar

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


1 post Gravatar

If-clause not working

General • Asked by Sascha M.

I've created a little tool which pulls a price from another table according to what was sold. This works perfectly fine. However I need to include a discount logic into that. There should be 3 way...


9 posts Gravatar

Advice on building a 'reports' feature

General • Asked by Jay Killeen

My Ruby on Rails enterprise app has a whole range of tables ranging such as customers, products, sales, warehouses, prices etc etc. I'd like to build a whole range of different reports that user...


4 posts Gravatar

Implementing Markdown Support in Forums

Gems / Libraries • Asked by Michael Stitt

Hi Chris, I watched all of the videos in the Forum Series -- nice work!. I'm wondering if you're still planning on getting around to showing us how to implement support for Markdown within the ...


1 post Gravatar

How do I integrate Doorkeeper gem with a Multitenant SaaS Application?

General • Asked by Aniket Rao

So I have a Multitenant SaaS Application where users signup, pay, create an account and start using the service. Now I have received a requirement where this service needs to have a andriod client ...


1 post Gravatar

How do I get e-mailed password change and confirmation links working with devise-token-auth and ng-token-auth?

Rails • Asked by Robert King

I am trying to use ng-token-auth (Angular 1) on a separate frontend to allow passwords to be reset and account e-mail addresses to be confirmed on a Ruby on Rails 5.0 backend. Whenever I request...


13 posts Gravatar

Displaying an address from a selected location

Javascript • Asked by shakycode

So in a form I have locations which are set in a `collection_select` statement in the form. Each location has a name (Dairy Queen, McDondalds, etc) and has an address in the Location model. When ...


4 posts Gravatar

Install Ruby from binaries on production: do or do not?

Ruby • Asked by Alex Musayev

I'm using rbenv with ruby-build plugin as a default way to install ruby for development and production environments. Is there a way to make installation process faster, but keep it stable? For e...


5 posts Gravatar

Ruby version stuck on macOS

Ruby • Asked by RJ McCollam

Setting up my new MacBook Pro and am running into an issue with ruby versions. At this point I have installed and am usin rbenv. I installed ruby 2.3.1 and when I `ruby -v` that is what it shows...


3 posts Gravatar

Track user's usage per month

Rails • Asked by Jack

So this is more an architecture question. Lot's of SaaS's have this in place: a monthly cap of sorts of their service. So every [time period] a user can upload X files, connect with Y other use...


8 posts Gravatar

How did you become good at back end development / Ruby on Rails?

Rails • Asked by Robert Paul

My introduction to Ruby on Rails was a "complete course" on Udemy and reading Michael Hartl's book. A year's worth of dedicated practice later, I'm still struggling with my skills and understandin...


3 posts Gravatar

About In-App Navbar Notifications

General • Asked by Christophe Estanol

Chris, thanks for this one. Notifications work like a charm. I was just wondering... How do I create different JSONs for different models? ``` json.array! @notifications do |notification|...


3 posts Gravatar

Multistep Signup-Form

Rails • Asked by Sascha M.

Hi there, do you know a elegant and quick way to create a signup page like cloud9 have? https://c9.io/signup Thanks a lot in advance!


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


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


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


2 posts Gravatar

Refile :fill does not work for me

Gems / Libraries • Asked by Wesly Mezarina

I have the refile gem connected with aws by following the instruction on their github. For an image i would get something like /attachments/store/78b928c7897e3b12de80cf1ffdfdfdfdf/image.jpg ...


3 posts Gravatar

How to i implement adobe e sign in rails 5?

Rails • Asked by naveen kumar

Echochamber is not up to date and also not working , i have found the working python app, should i use python to process the document , help me guys.


2 posts Gravatar

What's the best way to install a robust system which checks if an event is over-booked in Rails?

General • Asked by Mike Whitehead

I need to create a system for my Events site that monitors the number of bookings being taken to ensure an Event does not become over-subscribed. What is the most effective (DRY) way to do this? ...


6 posts Gravatar

Your biggest aha! moment?

Tips • Asked by Exequiel R.

Basically, what has been your biggest code aha! moment. That time when you understood some concept or mantra that you were familiar with but couldn't wrap your head around. For me, being the noo...


1 post Gravatar

Episode Suggestion: Normalization

Site Feedback • Asked by Chris Zempel

I've identified a tendency in myself that I feel like, if overcome, would make me a considerably better developer and produce better software. Here I'll try to characterize/analyze it: **Descrip...


15 posts Gravatar

Migrate away from Mandrill?

Gems / Libraries • Asked by Michael Stitt

You have a screencast where you [describe how to incorporate Mandrill into your Rails application](https://gorails.com/episodes/sending-emails-with-mandrill?autoplay=1), and because of that I've us...


3 posts Gravatar

How do I publish an RSS feed from my rails app?

Rails • Asked by Stan Smith

I have a simple blog setup with a posts model. Is there a gem that can publish a feed or should I create thus from scratch?


3 posts Gravatar

Mobile App with Devise Facebook OmniAuth

Gems / Libraries • Asked by Tang Rufus

My Rails 4 app is using Devise and Facebook OmniAuth. The web app is working perfectly. Now I want to make a iOS app to consume my rails app's API. Instead of telling iOS users to type in their...


6 posts Gravatar

`fresh_when` usage for dynamic queries

Rails • Asked by Nicolas Brousse

Hey! I'm recently looking to use `fresh_when` method on my `PostController`. ```ruby class PostsController < ApplicationController def index @posts = Post.published.order(published_a...


1 post Gravatar

Updating forum thread creates new post...

General • Asked by Erick Sitter

Forum Thread Controller class ForumThreadsController < ApplicationController before_action :authenticate_user!, except: [:index, :show] before_action :set_forum_thread, except: [:index, :n...


1 post Gravatar

Single sign in Devise STI

Gems / Libraries • Asked by John Munyi

Hey there I have an STI on devise model which is working but there is an issue with how to manage what menus to show when different types of users are logged in here is my code user.rb ...


3 posts Gravatar

How do I build a beta invite system?

Gems / Libraries • Asked by Rafid Hoda

Hi! I'm getting ready to release a beta for my rails app and I was wondering if there is an easy way(perhaps a gem?) to build an invite system, so that only users that receive an invite through ema...


2 posts Gravatar

How do i fix my jquery-ui autocomplete problem (details below)?

General • Asked by Kosta Pontidas

I followed your tutorial on elastic search/search kick and implementing jquery autocomplete. It works when I use "Test" as the data, however when I try to use my data from posts table, it doesn't w...


1 post Gravatar

Opening and closing a window to a new controller/view from a different controller/view

General • Asked by shakycode

I'm maintaining an app and need to add a pop-up window or modal that launches from the current view but loads a separate controller/view. So far I have a link_to setup to open the controller/view ...


17 posts Gravatar

Displaying previous score in current record

General • Asked by John Munyi

Hi Chris I got a lil logic issue going on here, have a look at this gist https://gist.github.com/bl4ckdu5t/ec48cc9d6eedeb877d06 so technically what i want is for each new weekly_perfo...


2 posts Gravatar

Create shopify type of Application

General • Asked by Oyewole Samuel

i'm currently working on multitenant application that enable user to create a personalize website after selecting a template, please is there any gem or method to achieve this?? Shopify type of App...


9 posts Gravatar

How to use Sweet Alert to replace standard confirm dialog

General • Asked by Daniel Weaver

I'm trying to use Sweet Alert to replace the standard Rails confirm dialog. I can get it working in a plain new Rails app but not in my production app. I'm using the *sweet-alert-confirm* gem he...


3 posts Gravatar

Two Forms/Two Controllers/One Page: Passing Instance Variables, Routing, and Error Handling

Rails • Asked by Michael Becco

So... I'm having a higher level conceptual gap on how to deal with a scenario in which a form errs out on a page that has two forms relating to two different controllers. My first knowledge g...


3 posts Gravatar

how to setup elasticsearch on Heroku?

Servers • Asked by Jeramae Bohol

I implemented the elasticsearch/searchkick on my app and it works on develoment. But it's not working on production. I did heroku logs and these are the errors: "Completed 500 Internal Server Er...


9 posts Gravatar

What do you listen to while coding?

General • Asked by Alan Reid

So i had an interesting chat with fellow community member Jacob, and we are wondering what music do you listen to while you're coding? What really gets you in the zone as you work hard creating ...


17 posts Gravatar

Multitenancy with the Apartment gem Sending email in production

General • Asked by Francisco Quinones

Hi I did the Multitenancy app works great only problem that im having is on production the app wont send email. On local machine it send it with no problem. Any help and what info that you need l...


4 posts Gravatar

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


2 posts Gravatar

Handle money in Rails

Rails • Asked by Wouter van den Beld

Hi, What do you think is the best way to handle money in rails? At the moment i use a decimal field with a precision if 16 and a scale of 2. the problem is that we use the comma as a decimal...


5 posts Gravatar

How do I use carrierwave and a custom process to upload an unzipped folder to s3

Gems / Libraries • Asked by Thomas Bush

## Goal - I take accept a zip file containing some config files as well as 2 folders filled with images - Unzip the folder - run a method to standardize the sub folder and image names as well as...


1 post Gravatar

Multiple objects in form and controller, hitting a wall.

General • Asked by shakycode

So I'm working on a old version of a legacy app Chris and I paired on, trying to refactor some functionality and am hitting a wall. I currently have some basic paging functionality which creates...


2 posts Gravatar

Actioncable production settings when using heroku + custom domain

Servers • Asked by Masud Hossain

So I built a website and pushed it to heroku production `example.herokuapp.com` and bought a domain to reroute example.com to show whatever is on `example.herokuapp.com`. This all works great, ex...


4 posts Gravatar

New Users Only Created by Admin User

Gems / Libraries • Asked by Michael Stitt

I'm building an internal app for my company that contains data from various sources (e.g. web analytics, server logs, etc.). It's hosted on an EC2 instance with a DNS of "reports.example.com". Ri...


1 post Gravatar

Access denied for user 'vagrant'@'localhost' (using password: NO)

General • Asked by Damon Delcoro

I have setup vagrant following the video and all is good but I can't seem to access Mysql. I have tried mysql --user=vagrant -p with no password but I get " Access denied for user 'vagrant'@'loca...


2 posts Gravatar

[HELP] How configure "pundit" to display items belonging to a parent bond

Gems / Libraries • Asked by Bruno Wego

I lost hours to solve it, but I know, I am a newbie =X. My use case is, if the user have role `:agency`, he can see clients. But I have to use the link between the client's agency to verify this...


2 posts Gravatar

Old Rails 2 Delayed_Job User_Mailer Question

General • Asked by Ja Ku

So I'm having an interesting issue. I'm trying to get this gem delayed_job to send an invitation email to sign up to an email address. The process seems to be working, and it is telling me that the...


7 posts Gravatar

How can I grow this search object?

General • Asked by Chris Zempel

I've got a domain object I use to search images by whatever tags it has/the year the item in the image was made. It's worked flawlessly in a couple places: ```ruby class SearchImage def in...


3 posts Gravatar

How to delete records in a join table?

Rails • Asked by Adrian DeGus

I'm using Refile for uploads and am having a tough time figuring out how to delete individual files. I need to display a delete link under each thumbnail, so my first thought was to do something li...


2 posts Gravatar

What to use for multistep(wizards) in 2016?

General • Asked by Szilard Magyar

Hey Chris, As of July 2016 what gem/solution would you use to create multistep forms? I have found a couple of solutions but couldn't decide what to choose. They kinda seemed a bit obsolete. It'...


3 posts Gravatar

Stripe Subscription with Initial setup fee

Gems / Libraries • Asked by Nick McNeany

Hey Everyone, I'm building a relatively simple subscription based app using Stripe, Devise, Pundit and a few other resources. My only real hangup at the moment is that the subscription requires ...


3 posts Gravatar

Dynamic Pricing based on user country

General • Asked by Enrique Benitez

Hello! I'm thinking of a way to handle dynamic pricing on my web app based on the user country, for example: A user wants to subscribe for a pro account on my website and this user is based o...


1 post 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: ...


11 posts Gravatar

Ecommerce multi-step checkout with guest accounts

Rails • Asked by Sean Murphy

Hello, I've been thinking about the best approach for implementing a checkout scenario in a custom ecommerce site I've been developing and wanted to see if anyone here had advice to share. We're...


4 posts Gravatar

JSON for Rails delegated attributes?

Rails • Asked by Brian Schwartz

In one of my Rails apps, I have the following architecture (as part of a current refactoring): - Contact (a lot of attributes common to all people) - Prospect (specific attributes to just pro...


1 post Gravatar

Deployment Question

Servers • Asked by Chris Zempel

[there was an error on original submission of this post, so I did it again and duplicated it. this one can be deleted!] [Please see this post](https://gorails.com/forum/deployment-question)


3 posts Gravatar

Proper location for null objects

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


5 posts Gravatar

Turbolinks and jQuery compatibility on Rails 5

Javascript • Asked by Lauro Silva

I have a hidden field that's activated when clicked on the link using jQuery. When clicking on the link, the field appears just for a second and then disappears. ```javascript $('.use-diff...


2 posts Gravatar

Episode Suggestion:

Site Feedback • Asked by Olsi Gjeci

Hey Chris. Is it possible to do an episode on recurrence, recurring events? I'm looking at ice cube gem and recurring select but not that easy for me to fully understand everything! it would be gre...


4 posts Gravatar

Problems with Routes and Forms (Am I a Newb? What am I missing here?)

General • Asked by shakycode

I'm working on my TimeClock functionality for a legacy Rails 3.2.21 app and am running into problems with simple crud type forms. I'm trying to create a new ClockEvent entry using a basic form i...


4 posts Gravatar

Style a drop down menu with css

CSS • Asked by jm castel

I watched the tuto on making notifications but i can't set the css to display the notifs properly. Could someone show me an exemple of his css ? Thanks


4 posts Gravatar

Does actioncable create 1 channel per user only?

Rails • Asked by Masud Hossain

Let's say you're planning on having real time Notifications and messaging. Does that mean that for each User, there will be 1 actioncable channel (redis) open? Or Does that mean for e...


15 posts Gravatar

Devise Filter chain halted as :require_no_authentication rendered or redirected

Gems / Libraries • Asked by shakycode

I have an app with Rails 3.2.20 and Devise 2.1.2 (Yes I know it's old) and there are random occasions where a user will trigger a URL i.e. `site.com/calls` and I will receive an error in the `produ...


15 posts Gravatar

How to build REST APIs?

General • Asked by Ali Ahmed

Hi Chris Yesterday I was just wondering that how can I build an app which follows REST principles. I searched on many articles and they are in too much nitty-gritty with less examples of how to ...


3 posts Gravatar

Which gem is the best for dynamic image resizing from an S3 URL?

General • Asked by Robert White

Hi, Which gem is the best for dynamic image resizing from an S3 URL? I know i can pre define this, but I have hundreds of people using the product with endless uses cases I'd like them to specify ...


7 posts Gravatar

Multitenancy with Apartment Gem

General • Asked by Tejas Patel

Hi Chris, I am using Postgresql and apartment gem and my database has many views and functions. so I am using config.use_schemas = true config.use_sql = true to use pg_dump but when I run...


6 posts Gravatar

How do I display a list of Favorited Posts from forum on the User Profile page?

Rails • Asked by Rob Sturcke

I'm creating a forum and am trying to display a list of posts that have been **favorited** by the current user in the ```users/show.html.erb``` view. When I favorite a post however, then go to m...


2 posts Gravatar

Using elasticsearch/searchkick to run a search bar via my navbar and show results in a search.html not index.html?

Rails • Asked by Omar Khedr

I just finished going over Chris's two great railscasts dealing with search. However, I wanted to put my search bar on my navbar so that whenever someone searches the results I will be taken to my...


6 posts Gravatar

validate presence of specific domain in email

General • Asked by John Munyi

Hi there, is a way via regex to validate an email and make sure it belongs to a specific domain, I found the below regex on SO and it doesnt seem to do the job. validates :email, format: { ...


1 post Gravatar

Use different repositories for frontend and backend?

General • Asked by Lykourgos Tsirikos

I'd like to ask a question. Lets say we have a web app that uses Rails api on the backend and Ember on the front end. The folder structure I guess would look like this: ``` my-app - backend...


3 posts Gravatar

Can products like APPSUMO or Sumome be built using rails?

General • Asked by Masud Hossain

So say i wanna build a website widget where people can install it with a few lines of codes. And in that widget users are able to sign up for my website or see certain information that's on my webs...


4 posts Gravatar

2 submit button in 1 form

General • Asked by Amirol Ahmad

Hi Chriss, Would like to ask do you have any plan to make a video about 2 submit button in 1 form for example Save as Draft & Publish button when creating a post?


2 posts Gravatar

Do I have to publish the source code of a commercial app if I use a GPL licensed gem like prawn?

General • Asked by Drilon Buzuku

Hey Guys, do I have to publish the source code of a commercial app if I use a GPL licensed gem like prawn? Cheers, Drilon


6 posts Gravatar

Flexible Nested Attributes

Gems / Libraries • Asked by Terence Devine

I'm working on a practice "Magazine" application, that has **Issues** with nested attributes of **Articles**, which has multiple nested attributes that are **Content Blocks**, which can be one of s...


5 posts Gravatar

Dynamic select boxes - like railscast 88 - but it ain't working

Rails • Asked by Aaron Taddiken

I am trying to scope a form selection list to from another select box selection. The select box groups the options correctly in the dropdown. Everything checks out in the console but it still does ...


4 posts Gravatar

Testing your markdown

Testing • Asked by Jay Killeen

I see your markdown tables aren't being rendered as tables. I have the same problem :( Any idea how we get this fixed? | Tables | Are | Cool | | ------------- |:-------------:...


4 posts Gravatar

I want to understand how basecamp separates account?

Rails • Asked by Dmitry Amelchenko

Is part **3319000** of url 3.basecamp.com/3319000/projects just a show action in the controller or is there implemented by gems? Will be great to see some examples. Sorry for my english.


5 posts Gravatar

Devise models and Single table inheritance and custom class methods

Gems / Libraries • Asked by John Munyi

Hello there I am in a little fix and cant figure out whats going in, i am attempting to have a devise model User share via STI with 2 other sub-classes . I am able to populate both classes with dat...


3 posts Gravatar

Migration Issue caused Heroku to fail.

Servers • Asked by Terence Devine

I have an application on Heroku that uses the Paperclip gem that recently had some issues - and I'm not 100% sure on what it was that caused it. I have the application working locally (including th...


5 posts Gravatar

has_one association on polymorphic model

General • 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, as:...


7 posts Gravatar

why .limit not working with find_by

Rails • Asked by Talib Guyani

am trying to retrieve date with @category = Category.find_by(slug: params[:slug]).limit(5) but i get undefine method .limit


2 posts Gravatar

Versioning question.

General • Asked by Brent C

I have a website where I would like to offer users the ability to edit the public facing data. However, after the data is edited I need to place the model in que for review. If edits are acceptable...


6 posts Gravatar

How do I add a loading spinner and bar like this site?

General • Asked by Enrique Benitez

I know it's a **turbolinks** feature but I don't know how to make it appear or how to do it, it's pretty nice the way GoRails handles the loading with that spinner and bar, how is it done? *Than...


5 posts Gravatar

How to add or call a particular action in all the controllers ?

Rails • Asked by naveen kumar

I want to store the user activity by using after_action in the all the controller for a specific action of those controller


2 posts Gravatar

What is the best way to handle omniauth

Gems / Libraries • Asked by Yashi EL

Hi Chris, after couple of test run i figure out twitter is hard to work with other oauth2 providers, because twitter api doesn't allow to access other user email.. can you guide me about how to do ...


4 posts Gravatar

collapse-able form feature in nested forms

General • Asked by John Munyi

Hi Guys I am looking for a way to implement a collapsible feature within nested forms, such that during edit the existing forms dont open up in full and user decides which forms he / she wants to ...


2 posts Gravatar

User create Dynamic Role base

General • Asked by Francisco Quinones

Hi! So my app uses CanCanCan and Devise for working with users. Now the app needs to have a feature where users can create role. How can I approach this new task. Example: Admin(User) can crea...


5 posts Gravatar

Apartment and Sidekiq

Rails • Asked by Francisco Quinones

So Im working with apartment and sidekiq and the job is not switch tenant. ``` gem 'apartment', '~> 1.0', '>= 1.0.2' gem 'sidekiq', '~> 4.0', '>= 4.1' gem 'apartment-sidekiq', '~> 0.2.0' c...


16 posts Gravatar

rbenv: bundle: command not found

Servers • Asked by Peter Boomsma

I'm trying to deploy my Rails app on my Digital Oceans VPS but I'm running into a error: Running `cap production deploy` ends up with this error: INFO[7cd03924] Running ~/.rbenv/bin/rbenv ex...


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


8 posts Gravatar

How do I use Let's Encrypt to get and automate SSL on ubuntu, nginx server

General • Asked by Thomas Bush

I was thinking maybe this could be a tutorial/guide request? I always use the GoRails guides to setup my ubuntu, nginx, passenger servers(thanks!) I am having trouble figuring out how to use ...


6 posts Gravatar

Passenger Spinning down in Production

Servers • Asked by shakycode

My favorite combination of Rails/HTTP is Nginx + Passenger. They work wonderfully together and it's been super easy to setup across all of my apps. One thing I've noticed in some of my apps that ...


3 posts Gravatar

3rd party integrations using Oauth/omniauth

Rails • Asked by Masud Hossain

When creating a facebook login, you put `user = User.from_omniauth(env["omniauth.auth"])` inside `sessions_controller.rb` , so when a user goes to /auth/facebook it will prompt them to login via fa...


3 posts Gravatar

Duration of a video in the listing page

Site Feedback • Asked by rabin prithvi

Duration of a video in the listing page would be highly useful to select a video to watch.


29 posts Gravatar

Searchkick: Reindex on model in multitenancy through default scope app

General • Asked by Mark Radford

Has anyone had any success indexing their multitenant data with searchkick? I followed the suggested article in the readme (https://www.tiagoamaro.com.br/2014/12/11/multi-tenancy-with-searchkick/) ...


2 posts Gravatar

Can I assign dates to display a link?

General • Asked by Nymweb

Hello, I'm doing an application where I have to show a link. The administrative must be able to assign the date where it is displayed and hidden. Sorry for my English. I think it's done with the g...


6 posts Gravatar

Error: uninitialized constant HTML::Pipeline::SyntaxHighlightFilter::Pygments when installing html-pipeline

General • Asked by Jay Killeen

I am getting an error: `uninitialized constant HTML::Pipeline::SyntaxHighlightFilter::Pygments`. my Gemfile shows: ``` ruby # markdown in comments gem 'html-pipeline', '~> 1.11.0' gem 'gi...


8 posts Gravatar

Advanced routing setup

Rails • Asked by Thomas Bush

I recently watched the [look into routing video](https://gorails.com/episodes/a-look-into-routing). I have a very complex routing scenario I have been asked to set up for work. I was hoping I cou...


2 posts Gravatar

Is it Ok to use "Error" as a model name in Rails project?

Rails • Asked by Alex Musayev

I have a simple question about class naming: is it Ok to use `Error` as a model name in a Rails project? This model will be used to persist Ruby exception objects for errors monitoring. Using `E...


5 posts Gravatar

Nested form and models?

General • Asked by shakycode

I'm working on an app that will track medication. I have a controller called `narcotic_usage.rb` which will be a simple form to note what narcotics are being used, their expiration dates, etc. ...


4 posts Gravatar

What happen to the search field for the videos?

General • Asked by Jin Pae

Seems like the site is currently undergoing some changes, but just wondering if we are getting back the search field for the videos anytime soon.


1 post Gravatar

Save external data in rails db, data structures

General • Asked by Catalin B

Hello, I need some help/advise on how to save third data in my database, also I'm interested in any tutorial or info about these topic. I'm struggling to save data from third party api. I get...


7 posts Gravatar

Trouble With Form Objects

Rails • Asked by Chris Zempel

I decided to experiment with a form object. ```ruby class Invitation include ActiveModel::Model attr_accessor( :first_name, :last_name, :email, :firm_id, :role ...


4 posts Gravatar

[HATCH] Error deploying app

Rails • Asked by Masud Hossain

I'm getting this error when trying to deploy my project with hatch. I made sure I have the RSA file. Deployment Error ``` Fetching origin Warning: Identity file /home/deploy/.ssh/thinkrtc_rs...


6 posts Gravatar

Multitenancy with the Apartment gem

Gems / Libraries • Asked by Francisco Quinones

Hi Chris Im trying to apply the Multitenancy to a exiting app. at the moment the tenant get create. how can I use the exiting that to be one of the tenant. When I enter with a exiting user to the t...


7 posts Gravatar

why my rails server logs show rendering a page two times, it that normal or there is something wrong with my code? Should it be only single time?

Rails • Asked by naveen kumar

Processing by Users::HomesController#welcome as HTML Processing by Users::HomesController#welcome as HTML Rendering users/homes/welcome.html.erb within layouts/application Rendering users/ho...


2 posts Gravatar

Rspec Test on Multi tanent app with aparment gem

General • Asked by Francisco Quinones

Hi I'm having a hard time figuring this out. https://gist.github.com/Frank004/8aa4acf20f60a3666a42 Im starting to do test on my Multitenant app and encounter a problem when trying to run the...


3 posts Gravatar

Video request: react-rails + caching

Site Feedback • Asked by z16a :P

idk if this is the best place to include screencast requests... Would love to see advance tutorials on using react with rails. A specific one would be caching best practices in react.


3 posts Gravatar

Embed Youtube video in Rails app

Rails • Asked by Markus

Hello. How is possible to embed an existing video an show it in a page with rails? I followed this guide with yt gem: https://www.sitepoint.com/youtube-api-version-3-rails/ So now I can pos...


7 posts Gravatar

Meaning of “Expected string default value for …”

Rails • Asked by Alan Reid

So i am starting a new project, and have done this meany times now. However this is the first time i have hit this issue! I created the app as normal **`rails new myapp -d postgresql`** I've ...


1 post Gravatar

routing errors when i try to submit a comment to a post

Rails • Asked by khemlall mangal

Hi Thank you, i followed this tutorial however i am getting Routing Error when i click submit for the comment... ``` uninitialized constant Squeals ``` Rails.root: /home/ubuntu/workspace ...


1 post Gravatar

simple_format and Embedded content

Rails • Asked by Tony

I currently have a part of my website where people can submit user generated articles. I use simple_format to retain the layout. e.g. `<%= simple_format(@post.content %>` As more and more ...


4 posts Gravatar

Devise with additional user fields, nested models / attributes and custom routes

Gems / Libraries • Asked by Dan Tappin

I have posted a few related questions on this but now I am at a road block. I had this system working quite well and then I went to add to it and now I broke it real good! First off I just disc...


3 posts 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. ✨ ...


9 posts Gravatar

Calling function from handling click event issue

General • Asked by Michael Derzhavets

Hi Everyone Using the UJS approach Chis showed in the NavBar notifications screencasts, I'm trying to implement something similar, and having very strange issue that I can't even imagine what's ...


2 posts Gravatar

IBM Watson

Tips • Asked by Patrick Berarducci

ANYONE WITH EXPERIENCE INCORPORATING WATSON INTO A RAILS APP? any resources or tutorials you found helpful? (Sorry caps are acting up)


3 posts Gravatar

What are the benefits of using rails-assets version of Bootstrap over bootstrap-sass version?

General • Asked by Dan K

And for other JS libraries as well. [Screencast](https://gorails.com/episodes/rails-assets)


2 posts Gravatar

How should I implement a week model with days and opening times?

Rails • Asked by Drilon Buzuku

Hello, I need a week model which contains all weekdays and every weekday has multiple opening and closing times. For example, a barber shop is open on every monday from 9 a.m. to 11 a.m. and 1 ...


5 posts Gravatar

How i can do multiple login with devise?

Gems / Libraries • Asked by Stefan Dabizljevic

Hi everybody temporary i'm working on some rails project where i have one super admin which can create company, employee, resources also he can to add employee in the some company employee can to h...


3 posts Gravatar

User Profile with devise

Gems / Libraries • Asked by Darren Nickerson

Hello I'm new to rails and I am trying to work with the has_one association. I'm using Devise for authentication. I was each user to have a profile (which will include their address and some other ...


5 posts Gravatar

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


4 posts Gravatar

Rails API backend with Electron Frontend

Rails • Asked by shakycode

I'm working on a SaaS platform that will be heavily API driven with a React or Vue front end. But there's a requirement for a desktop app to give the customer something "tangible" to hold in their...


14 posts Gravatar

SEEKING FREELANCER - Importing CSV file

Rails • Asked by Melanie

I've tried to follow along with Chris' tutorial on importing records from a CSV file. I cant get the file to upload. I've posted loads of quesitons on the discussion board for the first vide...


3 posts Gravatar

Building an enterprise app that has revision control similar to github (any gem that does something similar to this?)

General • Asked by Masud Hossain

I'm looking to create a webapp that lets users upload and save files similar to github (except no terminal usage. Users upload through the website) and have version control so they can retrieve pre...


1 post Gravatar

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


5 posts Gravatar

Error monitoring and notification for RoR

Servers • Asked by Ashley Engelund

I'm helping on a small RoR app. I need to set up error monitoring for it. `errbit` or `exception_notification` both look pretty good. This is a small app right now (< 200 users with logins, prob...


6 posts Gravatar

Radio buttons as actual buttons

CSS • Asked by Charlie Gaines

Hey all, I am trying to convert a form with radio buttons such that the radio buttons are just plain buttons. When selected they should have an active class and register the selected choice. I...


8 posts Gravatar

Devise - logging on with something other than email

Gems / Libraries • Asked by RJ McCollam

I have followed the instructions on this page https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign-in-with-something-other-than-their-email-address to allow signing in with some...


10 posts Gravatar

Problem with upgrading to Rails 4.2.2

Rails • Asked by Ariff Munshi

Hi all, Hope that someone here can help. I just got an old mac back and bumped it up to OSX 10.10.3 (was on snow leopard). Did a whole reinstall for homebrew, rbenv (was rvm), ruby (2.2.2), rai...


8 posts Gravatar

Deck Builder App. How do I query only decks you can make with the cards in your inventory?

Rails • Asked by Matias Fernandez

I'm making a deck building site similar to hearthpwn.com. It would be nice if users could filter decks based off the cards they have in their inventory. In other words, I'm trying to make a quer...


1 post Gravatar

Advanced Ransack Usage

General • Asked by Bryce Roney

Hi all, I've got the following question on StackOverflow: http://stackoverflow.com/questions/34259808/custom-ransacker-on-dynamically-generated-association Wondering if anyone here might have...


9 posts Gravatar

setup Postgres user fails

Databases • Asked by Anthony Candaele

Hi, I'm following the Deploy Rails guide I'm now a the part where Postgres gets installed. I successfully installed Postgres, but when I try to create a new Postgres user with: createu...


2 posts Gravatar

What's the rationale for making some videos "Pro Episode"?

Site Feedback • Asked by Danny Wu

Just out of curiosity, how do you decide which episode is a "pro" episode vs regular?


1 post Gravatar

Paperclip - Watermarking for dynamic image sizes

Gems / Libraries • Asked by Michael Victor

I'm looking to add watermarks to all images that are uploaded to my application. They can be of several sizes and this is where I'm running into trouble. This is my watermark processor: m...


5 posts Gravatar

Updating Rails Applications across Rails versions?

Rails • Asked by Andrew Fomera

Question, how do I go about handling the update process for my Rails apps? Example: I setup many apps with Rails 4.0.0 and currently 4.2.0 is out. What's the update process look like? I tried t...


3 posts Gravatar

Get started with Rolify for roles

Site Feedback • Asked by Melanie

Hi Chris, Please could you add an intro to rolify to your to do list. I'm getting very confused with the documentation. I want to have users in organisations who can have a role which ext...


5 posts Gravatar

Slack forum notifications

Site Feedback • Asked by Chris Oliver

Just testing out slack forum notifications.


2 posts Gravatar

Subdomains Email reset with Devise

Gems / Libraries • Asked by Francisco Quinones

Hi Chris so im trying to work with subdomain and maindomain email reset password I use the code on devise and for subdomain work like a charm but for the main domain I get this erro because they d...


2 posts Gravatar

Resource on how to do filters with checkboxes

General • Asked by Masud Hossain

I'm trying to create a way to filter my User results based on these filters. I'm looking for a guide with example on how to do this. http://image.prntscr.com/image/07e7113ac239436fa129fa874b5ac...


10 posts Gravatar

Can I 'alias' a Rails active model to another class

General • Asked by Dan Tappin

First off I am sure I am not asking this question correctly as this is an advanced Rails topic over my head right now. Here is what I have for routes: concern :assetable do resources :...


1 post Gravatar

[GET] Errors and Locales?

General • Asked by Ja Ku

So I'm dealing with an interesting but probably simple issue. Working on some Rails 2 stuff that was written by someone who has long been out of reach so I've been dusting it off on my own. Som...


2 posts Gravatar

Firefox rendering issues

General • Asked by Michael Victor

The site - leanhire.co that I'm working on seems to render perfectly on Chrome but it seems to be a mess when I view the site via Firefox. What do you think is missing and what is the best way t...


11 posts Gravatar

Performing calculations using scopes

General • Asked by John Munyi

hello , hopefully this isn’t too ambitious but i am hoping there is a way to do simple summation using defined scopes example is i have these scopes : scope :present, -> { where(presen...


6 posts Gravatar

Does anyone have tips on setting up redis and sidekiq on a Digital Ocean ubuntu 16.04 droplet?

Rails • Asked by Lance Williams

I have no trouble setting up redis but for some reason I can't get sidekiq to work. I can get sidekiq and redis to work locally on a mac using brew but not on a Digital Ocean Ubuntu 16.04 server. ...


9 posts Gravatar

How to create a dynamic form for Contest/Giveaway app

General • Asked by Ryan Swapp

I've got two models, Contest (has many entries) and Entry (belongs to contest). When I create a contest I want to be able to add some questions that would be dynamically added to the entry form... ...


1 post Gravatar

Workflow for TDD/BDD on Rails ?

Testing • Asked by Lykourgos Tsirikos

Hi, I'd like some feedback if possible about the workflow of TDD/BDD on a Rails app. I was doing a research the whole weekend trying to find some good examples on how to do porperly TDD on my Rails...


1 post Gravatar

How do you setup email in your application and link it to a record

General • Asked by Tabish Iqbal

Hey Chris. I have been trying to look online but haven't been successful in finding out the following. Say you made a CRM application in Rails and setup a pop3/imap email in the app. How would...


3 posts Gravatar

Storing Constant Date in Rails

Rails • Asked by Michael Victor

What is the best way to store a set of constants like country names, currencies, city lists in a rails app? I was thinking of having a model named Constants that stores all this data and another...


15 posts Gravatar

Using Pundit with ActiveAdmin

Gems / Libraries • Asked by alexander kehaya

Hey, I'm using pundit with active admin and getting this error message Pundit::AuthorizationNotPerformedError in ActiveAdmin::Devise::SessionsController#new In the pundit video you show u...


1 post Gravatar

How do I mark content as "seen" or "read" when it's in the user's view?

Rails • Asked by Sam

Hi everyone, I'm trying to mark messages as "seen" when the div has entered the user's view (for example, the Facebook behavior of seen posts). My current attempt is a mix of the Unread gem (htt...


5 posts Gravatar

How to subscribe to multiple chat rooms in a chat using Action Cable

General • Asked by Drazen Mokic

All examples i can find are subscribing to one single room by pasing a room as a param when creating the channel but what if i have Room A, B and C an i (as a user) am in all of them. This is an...


4 posts Gravatar

Retrieve all Project Threads where a given users has posted a Project Post

Ruby • Asked by Lauro Silva

A user belogns to a ProjectThread. And a ProjectThread has_many Users through ProjectPosts. On the Project Thread Index I want to display only threads where a given users has posted a Project P...


5 posts Gravatar

Wrong Ruby version with Postgres user

Ruby • Asked by Jeff See

I'm having a difficult time understanding the postgres section. I've setup a postgres user but when I type "ruby -v" with that user I get 1.9.3, whereas with the deploy user I get 2.1.3 (the correc...


4 posts Gravatar

Following "Scheduling post" episode with background jobs

General • Asked by Christophe Estanol

Following Chris great post on scheduling I am using `delayed_job_active_record` to schedule quote from my app to be tweeted and shared on FB. Here is my `quote.rb` model with the current logic: ...


3 posts Gravatar

Backing up Heroku PG and than pushing my brand new rails 5 app.

Servers • Asked by Masud Hossain

If you back up your Heroku PG database, this is storing all your users login info, right? So can I delete my whole rails app, push up a brand new rails app (using devise and rails5) and than pu...


4 posts Gravatar

How to setup the model associations for a simple e-marketplace?

Rails • Asked by Robert Paul

Hey GoRails devs, I am in the middle of setting up a marketplace (with stripe) and could use some help in conceptually thinking about the model associations. In the marketplace: a user can sell ...


1 post Gravatar

form builder for admin

General • Asked by Kelvin Atawura

is there any rails gem that you can use to create a form builder that an admin can use to create a form for the frontend. probs something that works similar to https://ninjaforms.com/ . Any ideas ...


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


11 posts Gravatar

Devise with multiple User Models with single login form

Gems / Libraries • Asked by Francisco Quinones

Hi im trying to have 3 type of devise users but one to have a single login. I need to find a way to make the routes to go to a site/login for all 3 of then. Im not using the 1 User model with 3 ty...


2 posts Gravatar

how to create and use different sub models of base data model

General • Asked by Vikas Sharma

I am an iOS developer developing my first rails app. I would like to have suggestion on what i am trying to build. I want to create a web portal for different type of service providers. Any body c...


5 posts Gravatar

Any good regex rules for validation?

General • Asked by Tim Cheung

Currently, i am searching regex rules for validate url. And i am struggled how to build this from scratch. Is anyone have a good resources on this topic?


3 posts Gravatar

Setting up “Next post” and “Previous post”

General • Asked by Lauro Silva

In my blog application I want to have a **"Previous post"** link and a **"Next post"** link in the bottom of my show view. But I'm having a hard time getting it to work. What am I missing? **Th...


2 posts Gravatar

Getting an simple Ajax request on Rails

Rails • Asked by Omar Khedr

Hey guys, just went through the Notifications videos. To see if I understood the concepts correctly, I tried doing my own solo Ajax request on the forum_threads instead of Notifications. I ran ...


5 posts Gravatar

Caching static pages without CSRF token

Rails • Asked by Nicolas Brousse

Hi, I'm looking to use `expires_in` method in my actions who returns static content. For this pages I would like to return a cache control header where `public` is `true`. Like this it allow a...


9 posts Gravatar

How to upload multiple file inputs in rails production?

Rails • Asked by Srinivasa Varma

Hi there, I'm trying to upload multiple file inputs from single form. The form is working fine in development, but in production the form showing that redirecting for long time and returns nothi...


4 posts Gravatar

where to look for errors besides nginx error logs

Servers • Asked by Anthony Candaele

Hi, My currently deployed Rails app seems to have issues with uploading images to Amazon S3 storage through CarrierWave. I get the familiar "We're sorry, but something went wrong." message. ...


3 posts Gravatar

Deploy and delete text!

Servers • Asked by Artem Kiryanov

Help! When i deploy my app from local machine to vps, my local image, text and another information have been deleted! How can i fix it?


2 posts Gravatar

how to play or download a song

General • Asked by corrado tuccitto

Hi I'd like to create a music catalog online of my music, where people can have a preview of few secs, and then can download them to be available offline but always by the same web page, somethin...


2 posts Gravatar

Why devise helpers are not available in application controller, except authenticate_user! ?

Rails • Asked by naveen kumar

undefined local variable or method `user_signed_in' in application controller but working fine in application.html.erb if user_signed_in layout 'admin_lte_2' else layout 'some_other_lay...


1 post Gravatar

USSD APPLICATION

General • Asked by sacko idriss

Hello I am working on a project that is to develop a platform. The platform will aim to monitor and records the payment transaction operations on the mobile network. I remind you that the mobile pa...


2 posts Gravatar

Can you use Actioncable for multiple things in your project?

Rails • Asked by Masud Hossain

I want to use actioncable to pull notifications AND also use it for user to user chatting. Is this possible and pain free to do? I guess what i'm asking is, can i join these two videos togethe...


4 posts Gravatar

ElasticSearch 400 error.

Rails • Asked by Sillico

Hello! I am pretty new to Rails and recently signed up to try to get some more exposure. I have been playing around with Elastic Search, but am having a hard time implementing some of the more ...


6 posts Gravatar

How to add logo image to mailer

Rails • Asked by Francisco Quinones

Hi how can we add image from my assets to the email like my logo when sending email to the users.


4 posts Gravatar

Saved messages as HTML

General • Asked by Martin McDermid

Hi Chris, I'm wondering, on your episode https://gorails.com/episodes/message-templates, would it be possible to have one of the saved messages as HTML? I've tried entering ```<h1>test</h1><...


4 posts Gravatar

A series on Turbolinks 5

Site Feedback • Asked by Marek Prihoda

Reading through the Turbolinks 5 documentation, there are mentions of several use cases, like eg. in the Making Transformations Idempotent sections (but there are more). It would be great if you co...


2 posts 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, :new,...


4 posts Gravatar

Better Errors ignore 404 errors

Rails • Asked by Brian Schwartz

I'm using better_errors gem to track errors better. Any idea how to make it ignore 404 or ActiveRecord::RecordNotFound exceptions? I want to test to make sure my 404 page is working correctly and I...


2 posts Gravatar

why there is no crsf token when i use remote true with data type as "script" ? How this is different from ajax?

Rails • Asked by naveen kumar

<%= select_tag "event[#{inquiry.slug}]", options_for_select([ "PENDING", "CONFIRMED" ], inquiry.status), :data => {url: update_status_vendor_inquiry_path(inquiry),method: "put", type: "script", rem...


3 posts Gravatar

How do i collect the users emails into mandrill ?

Gems / Libraries • Asked by Ahmed Althani

I have watched the mandrill tutorial. I just have a quick question. How can i link the list on mandrill or any email service with the users emails (when the user signs up ) and update the list wh...


5 posts Gravatar

Cookies vs token for authentication

General • Asked by Masud Hossain

You can keep a users session logged in by putting their cookies into the browser . But what about if youre using token based authentication instead and the users browser doesn't allow cookies ? ...


5 posts Gravatar

SQL injection attempts, any advice?

General • Asked by Javier Sanz

Hi there, In the logs of Rollbar for my app [petithacks.com](http://petithacks.com), I have seen in the past 2 days attempts like the ones in the image ![SQL injection attempts](http://static....


5 posts Gravatar

What do you think about this ?

General • Asked by Maxime Orefice

It's been a few months I follow you Chris and I'd like to say **thank you** for all what you've done. I often watch your episodes and a question got out of my mind, so I have to ask. What do ...


12 posts Gravatar

connection.rb in actioncable chatroom series, if not using Devise for authentication?

Rails • Asked by Masud Hossain

I'm watching https://gorails.com/series/realtime-group-chat-with-actioncable and i noticed that in channels/application_cable/connection.rb , chris put this code to find verified users. ``` ...


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


2 posts Gravatar

Sharing on Twitter / Facebook callbacks

General • Asked by Ilya Cherevkov

Would love to see a screencast on how to add functionality to share on Twitter / Facebook and receive callbacks. E.g. "Share on Twitter to get extra free month!"


2 posts Gravatar

why drop down menu (Account Setting)is not showing in sidebar?

Rails • Asked by naveen kumar

``` my html <!DOCTYPE html> <html lang="en"> <head> <%= csrf_meta_tags %> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta charset="utf-8"> <me...


1 post Gravatar

Integrate active admin in a rails app that has a dashboards controller named as the default dashboard for admin active gem?

General • Asked by John Munyi

Hi there I have an app which I need to add active admin dash but already has a model with the same name dashboard.. Will that cause problems in routes?


4 posts Gravatar

Deploying Rails App on UBUNTU Server - ERROR

General • Asked by Menj Villalobos

Hi anyone encountered same issue/error? ``` deploy:assets:precompile 01 /home/deploy/.rbenv//bin/rbenv exec bundle exec rake assets:precompile 01 rake aborted! 01 Psych::Sy...


9 posts Gravatar

Rails csv import with associations

Rails • Asked by Ryan Blakely

I am building a rails application that associates posts with many different categories. For example, I have a Post and need to be able to assign it to the categories Sports, News and Science throug...


5 posts Gravatar

Render \r\n in javascript.erb

Javascript • Asked by Wouter van den Beld

HI, I try to add the value of a text field in a form from a other database field. I use the following javascript ```javascript $("#assignment_conditions").empty(); $("#assignment_condition...


4 posts Gravatar

Jekyll, MiddleMan or CMS for a blog site?

General • Asked by Ariff Munshi

Hi guys, I've build quite a few production apps now with rails and I'm embarking on my latest project which is a niche blog site. I guess going with rails is a bit of an overkill with this one s...


1 post Gravatar

Ransack undefined method _path in Rails 4.2.1

General • Asked by shakycode

I'm working on a simple CRUD Asset Management app and I want to use Ransack. I think I have this setup properly in my view and controller but each time the index view is hit I get the exception: ...


1 post Gravatar

Cloning nested fields by JS/coffeescript

Javascript • Asked by Dmitry Amelchenko

SImple app has a two models and does the function to add nested model fields dynamically through JavaScript. But this stuff does not working with the Turbolinks 5. How to refactoring this code by J...


2 posts Gravatar

Access Rails constants from Webpack-managed JS

Rails • Asked by Alex Musayev

I'm just starting to use Webpack with Rails, and have a question. Let say there is a constant defined in Rails application. What could be a proper way to access this constant from JavaScript? Assum...


5 posts Gravatar

How to write a conditional in a create action?

Rails • Asked by Adrian DeGus

I recently worked through the 4 episodes here on direct uploads to S3 with shrine. I have things setup to upload both images and documents and am now trying to write a conditional to create eith...


7 posts Gravatar

How to manually manupulate data in the production database?

General • Asked by Anthony Candaele

Hi, I just successfully deployed my Rails app to a Digital Ocean VPS, following the Deploy Rails guide on this website. Many thanks go to Chris Oliver and James Dullaghan for their help and pa...


3 posts Gravatar

How do I implement Facades Pattern on a already advanced Ruby on Rails project?

General • Asked by Andres Max

A few days ago read the [four rules for developers](https://robots.thoughtbot.com/sandi-metz-rules-for-developers) and the Facade Pattern got my attention, however, find it somehow complicated to i...


4 posts Gravatar

Add Profile page for users

Rails • Asked by Rahul Lakhaney

Hello, Before i begin with my question, i would like to introduce myself. So i was introduced to ruby on rails via a friend around a couple of months back, when i decided to enroll myself with o...


2 posts Gravatar

Facebook Profile Image & Data using Devise in Rails

Gems / Libraries • Asked by Omar Khedr

I'm just starting to learn Rails so please forgive the dumb question. In my web app, I was able to set up devise successfully and then link it Facebook using Omni-auth gem. However, two things occu...


7 posts Gravatar

Simple_form Chrome browser bug

General • Asked by Stan Smith

This is annoying. The select menus are overlapping in Chrome. ![](https://s3.amazonaws.com/ps-toolbox/downloadables/toolbox_pushingsocial_com_articles_culture-branding-checklist_edit.jpg) Has ...


4 posts Gravatar

how do implement a rails popularity/trending algorithm

Rails • Asked by Samuel Janes

I'm making a web app and I want to sort through a model based on popularity/trendiness, kind of like reddit/hacker news. I want to determine the popularity based on the count of comments, likes, a...


2 posts Gravatar

How do I implement a default_scope order when I'm using searchkick?

General • Asked by Jeramae Bohol

Before I implemented searchkick/elasticsearch on my rails app, the default_scope -> { order(created_at: :desc) } works. But after implementing searchkick/elasticsearch, it doesn't work anymore.


2 posts Gravatar

IFTT

Gems / Libraries • Asked by stan X

Hi Go Rails Community! Would any of you ever looked or seen a project/ tutorial on IFTT and rails app connection? I would be interested in directions in terms of going deeper? I know i have to rea...


6 posts Gravatar

DateTime causes StackError when config.time_zone set.

Rails • Asked by Wouter van den Beld

Hi, I have a strange problem When i do the following method with no config.time_zone set in the application.rb it works. ```ruby def send_assignment @assignment = Assignment.find(param...


5 posts Gravatar

School System

General • Asked by Jorge Dominguez

Hi there guys im building a school system and im stuck on the assistance module. I havent come to a way to make it work, for example: A school period start at september 2016 and finish july 2...


6 posts Gravatar

Affiliate Program Gems

General • Asked by Brent C

I would love a tutorial on creating an affiliate program... Anyone have any gems they can recommend?


2 posts Gravatar

Multiple Users with Devise

Gems / Libraries • Asked by Ja Ku

Hello! I'm new here. I'm currently working on an app and I'm trying to wrap my mind around how I want to handle authentication using Devise. I've read the past threads that were similar to my situa...


1 post Gravatar

Screencast Request: Unicorn vs. Puma

Site Feedback • Asked by Matthew Welke

I'd love to see a video describing the differences between Unicorn and Puma, and how to tweak the settings with them (process count, thread count, etc) to get the highest performance possible.


6 posts Gravatar

How do I check if runner.interest is not null in this interpolation?

Rails • Asked by Neil Patel

hi i am working on this interpolation where the runners has interests but lets say the runner has not interests , or has not entered any interests how would we interpolate this Your ...


1 post Gravatar

3rd party integration best practices/problems

Site Feedback • Asked by Szilard Magyar

Hey Chris! I was wondering about the differences of the implementations of complex 3rd party integrations. For instance on the one hand there is segment.io or intercom.io. For these to work you ...


1 post Gravatar

Hi Chris How do I add jquery and ajax to the comments form from your tutorial?

General • Asked by emmanuel alcime

I wrote some jquery to accomplish this here is the code. $(window).load(function(e){ $("#comment_body").on('click',function(){ $(this).removeAttr('placeholder'); }); var...


1 post Gravatar

Getting data from one Rails app to another

General • Asked by shakycode

I'll try to keep this as brief as possible. I have a Rails app which is a static codebase and runs on 9 different servers all the same db schema but of course with different values. I wrote ...


8 posts Gravatar

Who is using Hashicorp Otto?

General • Asked by Jay Killeen

Hi All, I've recently gotten back into my rails development after some Salesforce related projects at my work. In that time I had to format my laptop from Ubuntu to Windows 10. I've been stru...


1 post Gravatar

Is Actioncable + Redis compatible with APN's?

Rails • Asked by Masud Hossain

I built my chat app using rails actioncable and than was able to make an ios app that pulls the conversation and messages. Everything works fine. My question is, is it possible to set up apple...


1 post Gravatar

More Series on creating stuff with RoR instead of using Gem

General • Asked by Nahwin Rajan

Hi Chris, Any plan in near future (couple months) for uploading series about real RoR development ? I mean like building a commerce site, it would be more complex with real world hurdle ? (AirB...


2 posts Gravatar

Question BEST_IN_PLACE

Gems / Libraries • Asked by Nymweb

In Rails 5 versions is it recommended to use the gem Best_in_place? What other alternative is there?


4 posts Gravatar

What are the advantages/disadvantages to using Rails with AngularJS?

Rails • Asked by Rob Sturcke

Came across a tutorial for using Devise authority tokens in a rails API, however are there any other reasons to use AngularJS and Rails? Advantages or disadvantages? The AngularJS with Rails t...


4 posts Gravatar

Background Jobs

Rails • Asked by Sascha M.

Hey there, I'm using nested attributes to generate a bunch of records at once. I'm coding a tool that crawls IP and Website Informations. The nested attributes are set up like this: -Compa...


1 post Gravatar

Creating appointments with calendar integration

General • Asked by Daniel Kehoe

Hi, I'm working on an app for a personal trainer, at the moment I've got a User class with STI for clients and trainers. The way I would like the appointments to work is from the trainers side they...


1 post Gravatar

Multiple role based authorization

General • Asked by Bruno Wego

Hello friends, I have a handful of doubts in an interesting senario, I hope can give me a little help. My application uses angular with [ng-token-auth](https://github.com/lynndylanhurley/ng-toke...


10 posts Gravatar

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


7 posts Gravatar

CSV Model method and Summing Hours cleanly.

General • Asked by shakycode

I've made a bit of a mess with my timeclock functionality. Basically what I want to do is pass all of the records in a given search range (which I've already written a model method for and it's wo...


4 posts Gravatar

Deployment to EBS - Helo debugging ERROR: CMake is required to build Rugged.

Rails • Asked by Lauro Silva

Being trying to deploy my rails app using EBS. I kepp getting the following error. I've tried updating and installing rugged. But the problem seems to be cmake on EBS. CMake is an extensible the...


11 posts Gravatar

Elastic search & search kick incorporating dates fields and integers

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


4 posts Gravatar

FAO: Chris... URL Errors on pretty much any Rails site

Rails • Asked by Alan Reid

Hi I've come across a really weird bug, not just in my project but on quite a few rails sites. `https://gorails.com/users/sign_in?redirect_to=%2F` - **works fine** `https://gorails.com/users/SI...


15 posts Gravatar

Why after I switch controller and switch back again , the form submit button Failure?

General • Asked by Larry Qu

after I switch the controller, and switch back, the form submit button Failure, if I refresh the page , it can works again. the console and network no error log.


11 posts Gravatar

CoffeeScript check if a checkbox is checked?

Javascript • Asked by shakycode

I have some simple CoffeeScript that toggles a div based off of if a checkbox is checked in a Rails form. The CoffeeScript looks like this: ``` $("#bill_patient_checkbox").change -> $("...


22 posts Gravatar

video about sortable lists

Rails • Asked by Anthony Candaele

Hi, I'm not sure if this is the right place to post this issue, but I'm looking for a way in my Rails app to reorder items by drag and dropping. I tried to implement the solution by Ryan Bate...


2 posts Gravatar

How do i implement a trending function like twitter or facebook on my rails app?

General • Asked by Earl Greenwood

I want to implement a trending function for last 24 hours hottest topic discuss or mentioned most in my website,i want to know is there anyway to implement this function in ruby on rails application?


6 posts Gravatar

medium/gorails like loading progress at the top of the page

Javascript • Asked by Szilard Magyar

Chris, What turbolinks compatible solution (gem or anything) would you recommend for implementing loading progress bar for page load? Thanks, Szilard


4 posts Gravatar

Dynamically create sass variables in rails

CSS • Asked by Matt Taylor

I have a multi-tenant app where each tenant can set their primary and accent colors. Is there a way i can grab those values and insert them into a sass file on page load? I"m using rails 5 and post...


2 posts Gravatar

Whats the gem I can use for Tokenize Field?

Gems / Libraries • Asked by Mirza Selim Reza

It would have been great to receive a tutorial on Tokenize inputs. Thanks.


6 posts Gravatar

Where to put my Big Ole' Array

Rails • Asked by Brent C

I have an array of states and abbreviations that I check when a user is performing a search. If the items is not in the array it moves on to using a geocoded service. I do the initial check current...


2 posts Gravatar

How to generate PDF based on search using prawn in ruby on rails

Gems / Libraries • Asked by Francisco Quinones

So Chris im using prawn pdf in my app. Now im adding some search form to filter by date range. All works fine and I get my filter table on my index. my problem is with prawn that wont hold the fi...


4 posts Gravatar

rails + DB dependent destroy vs cascade delete

General • Asked by Szilard Magyar

Hi, I wanna make sure that child objects also gets deleted when deleting parent. I'd like to use both `dependent: :destroy` (rails side) and `on_delete: :cascaade` (db side). Is this a good ...


3 posts Gravatar

Will there be GoRails as open source project?

Rails • Asked by Talgat

There are a lot of cool stuff that made with love. It'll be very usefull to learning advanced stuff from source code of GoRails


9 posts Gravatar

Prevent spam bots from hitting app

General • Asked by Nino Rosella

Hi guys and gals Wasn't sure which category to put this in but here goes anyway... I have a Rails 5 app in production hosted on Heroku. I recently noticed a particularly high load on the serv...


8 posts Gravatar

Dynamic Active Record Associations?

General • Asked by Brent C

Trying to wrap my head around the best way to handle this. I have an Event Model that has_and_belongs_to_many :event_types in my Event model I currently have a column for price.. However, wh...


5 posts Gravatar

EAV Rails way?

Rails • Asked by Anand Padia

Hi Team, I was trying to explore possibility of using EAV (Entity-Attribute-Value) pattern in our application. We are a ecommerce solution and would need Product variants to be captured, I did s...


7 posts Gravatar

How to use In-App Notifications as an activity feed?

Rails • Asked by Adrian DeGus

I worked through https://gorails.com/episodes/improving-in-app-notifications yesterday and it works great. I tried to use this same system create activity feeds for my different models, but ran ...


4 posts Gravatar

ActionController::UnknownFormat in MessagesController#create

General • Asked by Rob Sturcke

Ran into this error in part 4 of the ActionCable group chat. What exactly am I missing? Schema looks fine same with MessagesController. ``` ActionController::UnknownFormat in MessagesControll...


2 posts Gravatar

Mention

Rails • Asked by Aime Ngongang

hi Chris Oliver on the @mentions episode can you share the css you use to show both user name and profile picture? Thanks


4 posts Gravatar

Multi Site in Rails

Rails • Asked by rabin prithvi

Have a Rails app which acts as a API client. Request may come from 6 different domains. Each site will have same layout. Difference between each site would be the theme color , logo and the tex...


2 posts Gravatar

How to build a web scraper using Ruby...

Ruby • Asked by Danny Wu

Hello Chris - can you please teach us how to build a web scraper using Ruby to collect data from the web?


5 posts Gravatar

API design/routing with nested resources

Tips • Asked by Sean Washington

Hey all! I'm just curious, how would you surface the ability to create nested items in an API? Say you have a model `Post` that `has_many observations`. I have my base routes for both Post an...


1 post Gravatar

jQuery and Turbolinks not playing nicely

General • Asked by shakycode

Ok, so I'll try to make this brief. I have a new Rails 4.2.1 app using Ruby 2.2.2 and I'm trying to do a live search on a basic crud model. I have ransack installed and it's working great. But...


1 post Gravatar

How does searchkick work with Friendly Id for scoped objects?

General • Asked by Satchit Shenoy

I've developing an app where posts are nested under locations and are also scoped by location. Through Search, I am able to locate these posts under the location/:id/posts, but not under the locati...


3 posts Gravatar

link_to question

Rails • Asked by Adrian DeGus

I'm working on a project management app that has a dashboard which links to tasks that are overdue, due today, this week, next week etc. I can display the task titles fine but can't get the lin...


9 posts Gravatar

Rich text format editor in rails 4

General • Asked by John Munyi

I am looking for a rich text format editor that is compatible with rails 4, any good ones out there, I want to make beautiful text-areas with rich text. cheers


2 posts Gravatar

How do I add a default time of 6:45pm to simple form / DatePicker

Rails • Asked by Neil Patel

Hello Folllowing on from the prev 2 posts , How do i add the default time of 645pm in the form. So when someone craates the form a default time of 645 is already setup. I am using simple form a...


2 posts Gravatar

Building out a mini-framework with CoffeeScript

Javascript • Asked by Daniel LeGrand

A portion of the application I'm working on has a comments page with a form at top to add new comments and a list of comments beneath it. I've been working on using CoffeeScript classes to represe...


3 posts Gravatar

How do I implement voting in Rails?

General • Asked by Karl Coelho

I have an app that has a resource called 'pins'. I want to add upvoting, and possibly downvoting, to the pins, so that I can rank them on the site Sort of like Reddit karma. I was thinking that an ...


7 posts Gravatar

How do i save a field in a separate table when using devise?

Rails • Asked by Alan Reid

I am using devise for my users, during sign up i have an extra field i want to store in a different table in my Postgres DB. How would i go about storing this extra field? So a **company** `has_...


7 posts Gravatar

Deployment Question

Servers • Asked by Chris Zempel

Hey, debugging a deployment script I didn't set up and running into an error that I'm not making any headway with via StackOverflow or general Googling. Here's what it is: ``` bundle exec ca...


5 posts Gravatar

Use .ENV instead of Secrets.yml for keys

Servers • Asked by Rob Sturcke

Regarding around time area 3min for *Direct File Uploads to S3: Part 2*, I was wondering if I could just use ```.ENV``` since I'm using this as an example for my Github and Heroku. Instead of putt...


3 posts Gravatar

How to display multiple models in the same infinite scroll

General • Asked by Aaron Mills

So I have a Post model and a Category model and a User model. So a user can have many posts and a post can have many categories. So returning a group of posts is very easy, however a post can h...


2 posts Gravatar

From the active cable chatroom series how to I fix the size of the chatroom and scroll

Javascript • Asked by John A. Cogan

I have implemented the chatroom but I want the chatroom area to be fixed and for the user to be able to scroll back through the messages. How can I add scrolling? I have tried added it to the pane...


7 posts Gravatar

Capistrano deployment errors

Servers • Asked by Wouter van den Beld

Hi, I installed the working_hours gem to calculate SLA hours on my ticketsystem. It all works on dev so i was ready to deploy it to the production machine with capistrano now i get the follow...


4 posts Gravatar

Multiple select for CSV Export

Rails • Asked by Sascha M.

Hi there, My users can create a report record which is basically a scaffolded model "**Report**" with controller and views. The users can use this model to create records that a CSV method is us...


3 posts Gravatar

I didn't understand this part of the Liking Posts

Rails • Asked by Maor Tzabari

``` <div id="likes"> <%= render partial: "likes" %> </div> ``` we render something here, but where is this partial? usually when I render something with Rails it's a form or other code th...


3 posts Gravatar

Autocomplete a form field

General • Asked by Benny Maas

Hi, i have the following models: users, markets, assignments, products, sales, a user gets an assignment, and then he should enter his sales for the assignment. i have a sales form with t...


2 posts Gravatar

subscribe if old one month user

General • Asked by Szilard Magyar

Hey Chris, Just wanted to let you know, that I couldn't subscribe from my profile. I'm used to be subscribed to onemonth, so I got the free half a year subscription to gorails. That has expired ...


8 posts Gravatar

What is your dream app?

General • Asked by shakycode

If you could build anything (think outside of the box), what would it be? Things I'm working on that are fun to build: * Whisper clone with material design UI for mobile and web * Anonymous ...


6 posts Gravatar

Installing RoR on macOS machine

General • Asked by Menj Villalobos

Hi, I would like to ask if you can help me with this error while installing RoR on my mac machine running on a macOS 10.12 version. Based on this guide https://gorails.com/setup/osx/10.12-sierra ...


2 posts Gravatar

Push bitmap to clients in realtime

General • Asked by Ilya Cherevkov

Hi Chris! I want to create a service which will show a heatmap with some stocks data in realtime (updated each second). Each second there will be around 100 new data points and in general, chart...


4 posts Gravatar

Best practices for manipulation/working with data from model after creation

Rails • Asked by Jack

Consider the situation where a model is created to which the data needs to manipulated/worked with right after creation. For instance find (`*match`) a certain string from a long string, convert (p...


3 posts Gravatar

Could you make a ActiveAdmin episode?

Site Feedback • Asked by Rob Sturcke

Was browsing and found out about ActiveAdmin and thought it would be pretty cool to work with. http://activeadmin.info Best, -Rob


3 posts Gravatar

¿How make I to upload multiple images with refile?

General • Asked by Saul Felipe Ramirez

¿How make I to upload multiple images with refile?


4 posts Gravatar

Optimizing Queries in Service Objects

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


3 posts Gravatar

How do I build conditional form fields?

General • Asked by Satchit Shenoy

I'm trying to build a form which contains categories and subcategories. The desired effect is to display the subcategories field or the relevant subcategories depending on the category that has bee...


4 posts Gravatar

searchkick's autocomplete does not work on my iphone safari?

General • Asked by Jeramae Bohol

I've implemented elasticsearch/searchkick on my rails app and it works both in development and production on desktop browsers. But I noticed that the autocomplete does not work on safari on my phon...


8 posts Gravatar

Nginx.conf failed

Servers • Asked by Jagger Kyne

I followed line by line in [this tutorial](https://gorails.com/deploy/ubuntu/14.04)to setup my own production server. After Nginx is installed and up and running, I followed the instruction to m...


3 posts Gravatar

How do I make certain partials show everywhere (ie navbar)?

General • Asked by Masud Hossain

I'm trying to have my 'conversations' partial which is a list of all active conversations show up on the navbar, but of course I'm getting a no method error. I figured you can copy the conver...


5 posts Gravatar

Nested attributes

Rails • Asked by Giancarlo Corzo

Hi All, I'm working with nested forms and I'm stuck trying to create the two models and the controller to handle this association. My models following this structure: Survey -> recipients ...


11 posts Gravatar

Use coffeescript or javascript in rails form to grab model attribute

Javascript • Asked by shakycode

I am working on a Rails app and need some help with coffeescript which I'm honestly not very good at. I have a form with a field called location_id using a collection in Rails. ```` <%= f.gr...


1 post Gravatar

Rails Paperclip Gem - save parent model ID to path

General • Asked by Terence Devine

I created a question on StackOverflow - but it hasn't gotten any attention as of yet, so I thought I'd share it here. If you have any suggestions at all, feel free to share! http://stackoverf...


3 posts Gravatar

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


2 posts Gravatar

Bug in search

General • Asked by Jerry Clinesmith

If you search for the word "type", it's causing a 500 error. Just wanted to let you know. Thanks for the site! Jerry


3 posts Gravatar

How do I Geocode location with either address or Lat / long

Rails • Asked by Joe Minock

I'm building a portfolio app where a user can share all of the locations that they like to work from. A location can be a home, office, coffee shop, park or some random place in the wilderness. Giv...


8 posts Gravatar

API TOKEN DEVISE

Gems / Libraries • Asked by Saul Felipe Ramirez

Hi, I have a question about which gem is better, devise_token_auth or devise_token_authenticatable?. I see that devise_token_auth was update recently while the other not.


54 posts Gravatar

Pull data from another table in a lookup

Rails • Asked by Alan Reid

Hi all, I am looking up a list of articles, depending on the brand ID's - [email protected] = Article.where(brand_id: brand_ids)` what i would like to know is there a way to retrieve the brand name in th...


19 posts Gravatar

Solutions for high memory usage in rails development or production(heroku)

Servers • Asked by Masud Hossain

So i built my web app that allows users to chat with eachother, see who's online, and send notifications all using actioncable and it's using up A LOT of memory it seems. Correct me if i'm wrong, b...


5 posts Gravatar

How would you nest the forum_threads in your Forum series?

General • Asked by Chris Collinsworth

I am messing around with the forum repo and I have been trying to nest the forum_threads inside of a school model. I want every school to have their own forum. What would be the best way to accompl...


9 posts Gravatar

Need someone to look over this to make sure i am on the right track...

General • Asked by Alan Reid

So this site i am building goes something like this. I need to let **users** log in and manage their **brands**, each **brand** belongs to a **company**. A **company** can have many **users** wh...


2 posts Gravatar

(for developers)How much would it cost to develop a rails app?

General • Asked by Ryan Bent

I know there is a huge range on how much rails app would cost, Just ballparking, how much would it cost to develop a web app with subscription services for access to video content and email with d...


2 posts Gravatar

Verifying iOS in-app purchase receipts

General • Asked by Michael Cho

Anyone have any experience with handling iOS in-app purchase receipts? I know there's a Gem called Venice, but couldn't find much documentation or tutorials online. Appreciate any advice!


1 post Gravatar

dymanic data filter with jquery

Javascript • Asked by John Munyi

Hi Chris I want to replace the create action of my app with dynamic jQuery data pulling so that user has a chance to see the data pulled from the DB before the actual create happens , so currently...


19 posts Gravatar

Errors Following the Deploy Rails Tutorial

General • Asked by Dan Tappin

I am literally following the Setup and Deploy tutorials line for line. I have my local dummy rails app up and running and I am trying to run my first deploy to DigitalOcean. Here is the error I a...


2 posts Gravatar

Incorporating an Admin Dashboard

CSS • Asked by Dave Ekhaus

Hi All Say you've found a sample Admin Dashboard web site. Its delivered as a 'skeleton' html.css app. In order to use it one needs to 'port' (for lack of a better term) - all the necessary re...


8 posts Gravatar

Multi Model Sign-up Wizard

Rails • Asked by Dan Tappin

Related to my previous thread (https://gorails.com/forum/structure-guidance-multi-tenancy-authentication-authorization) I plan to have authorization with Devise and some sort of role based system (...


2 posts Gravatar

Opinion: Namespacing Areas of the Application

General • Asked by Chris Zempel

I'm working on an application related to a fic sport. A large deal of the value of the application revolves around being able to track different stats by player by position by season. There...


10 posts Gravatar

How do I import a Sass library from within a "node_module" (Rails 5.1)?

Rails • Asked by Peter Marcano

Pretty much the question above! I have a Rails 5.1 app with webpacker installed, and I used npm to install a front end framework: `npm install bulma --save` Now that it is inside of `node_...


4 posts Gravatar

Add paywall functionality to app

Rails • Asked by Stan Smith

I would like to offer people x views of certain pages then prompt them to pay for access. I was looking ot use this gem acts_as_paywall - https://github.com/BarefootCoders/acts_as_paywall but wan...


4 posts Gravatar

Live Stream Video w/ Rails

Tips • Asked by Wali Chaudhary

Hey Chris could you do a video on live streaming video with ActionCable or integrating it with an gem? Thanks!


3 posts Gravatar

Pointing a method to a namespace, class, or something (ruby question)

General • Asked by Chris Zempel

I'm building an API wrapper and struggling with how to set it up the way I'd like. Here's an example of what I'd ultimately like this to look like: ```ruby ServiceName::Client.new(api_key).reco...



5 posts Gravatar

Dynamically Defined has_many with odd behavior

General • Asked by Chris Zempel

Here's a quirk that's confounding me: Data Model: ```ruby class Athlete < ApplicationRecord has_many :stats end class Stat < ApplicationRecord belongs_to :athlete belongs_to :...


3 posts Gravatar

How do I implement OpenID Connect into my Rails application?

Gems / Libraries • Asked by Adam Tarantino

Does anyone have experience with implementing OpenID Connect into a Rails app? Specifically the relying party (RP) rather the openid connect provider (OP). I have investigated a couple differen...


1 post Gravatar

Recurring Select Accepts "Null" As a Valid Rule

Gems / Libraries • Asked by Steve Polito

I followed the Chris' excellent tutorial on [Recurring events with the ice_cube gem](https://gorails.com/episodes/recurring-events?autoplay=1). However, I was running into an issue when the value ...


6 posts Gravatar

Import a CSV with associations?

General • Asked by Robert Guss

I am building a rails application that associates serial #'s with software titles. For instance, I have a software title, and need to be able to upload batches of serial #'s(codes) and associate it...


2 posts Gravatar

Finding Users in Group Chat Go Rails Class

Rails • Asked by Omar Khedr

Hi guys, I went through Chris's Go Rails course on Group Chat with Action Cable and learned loads from it. One of the things that I need some help with though is being able to find all the chatr...


11 posts Gravatar

filter child record by the parent.

Rails • Asked by Francisco Quinones

Info: My models and association. I got a ServiceUser ( Manager ) model,User model, ServiceCompany model, Employee model and a Project model. A ServiceCompany can have many projects, employees and m...


6 posts Gravatar

How do i update an attribute for belongs_to association when scraping a site?

General • Asked by Wesly Mezarina

So pretty much a `anime` belongs_to :season and a `season` has_many :animes. I'm scraping a site and i'm collecting the season like "Spring 2015". I want to be able to assign "Spring 2015" to a an...


8 posts Gravatar

Hatch: Deploying my first App

Servers • Asked by Nick McNeany

Hey Chris, I was playing around with Hatch last night and it's really cool, awesome work! I am having a little drouble deploying though. I'm getting this > Git clone failed > > This u...


1 post Gravatar

How to perform bulk update in rails?

Databases • Asked by Srinivasa Varma

Hi there, Here is the problem in more detail. I tried to perform bulk update on rails model, but ended up with normal save method. I have some number of records and i wanted to update their valu...


1 post Gravatar

error when i click on follow button ... Relationship is not working

Rails • Asked by khemlall mangal

All i am trying to create follow and follwers relationship and i am experiencing some issues. Chris i think you should create a course on this as well. i am getting issue undefined method `id' for ...


4 posts Gravatar

How can I implement back button and bookmark history with turbolinks ajax and rails 4?

General • Asked by Adrien Nhem

Hi guys! I have been asking this question everywhere... basically I am building a user dashboard and it load the main div with ajax calls. I wanted to know how can I update the URL when an ajax...


2 posts Gravatar

How Do I Create an App Where Each User Has A Separate Table

Databases • Asked by Vikram Sharma

Hi, I want to create a web app which is a simple HR SaaS. Each user/company which registers will have get a separate table to upload list of employees. In terms of autorization a user/company ca...


3 posts Gravatar

Controller naming...

Rails • Asked by Alan Reid

Evening all, So i have a question about naming controllers. Which would be best to use? MyOrder or MyOrders Is it just the DB which get pluralised?


7 posts Gravatar

GoRails Markdown and Preview

Gems / Libraries • Asked by Ivor Padilla

Hey Chris, Just wondering what are you using to preview Markdown in forum posts? I watched the whole Forum series and I saw the other video about html-pipeline gem but you don't mention syntax h...


5 posts Gravatar

Good public national holidays api?

General • Asked by Andrei Crudu

I am working on a project and I need an api from which to import all the national holidays for a certain country and even for specific regions in that country. So for example I could import all...


4 posts Gravatar

Feature Guidance - Linked Posts

General • Asked by Rory Walker

Hey Fellow GoRailers, I have a feature that I'm implementing and some guidance would be well appreciated. It's linked posts: every time a posts gets updated, a link is placed on the original rep...


9 posts Gravatar

How can I subscribe a user when creating a new project?

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


7 posts Gravatar

Non Restful actions in the controller

Rails • Asked by Jay Killeen

I originally asked this question about building a reporting feature in my app https://gorails.com/forum/advice-on-building-a-reports-feature. I'd like to simplify this question even further. I w...


3 posts Gravatar

Changing currency

Rails • Asked by Alan Reid

I would like to change the currency in my app for each site. So i currently have **`number_to_currency(aNumber, :locale => :gb)`** which works well. I have a number of sites which use different ...


2 posts Gravatar

field_for with index

Javascript • Asked by Wouter van den Beld

I have a form that uses java script and the data-attribute to do some calculations (Calx2). to make the data-attributes unique i use the the index method that is available. ```ruby <tbody id=...


1 post Gravatar

Flexible Nested Attributes

Rails • Asked by Terence Devine

I'm working on a practice "Magazine" application, that has **Issues** with nested attributes of **Articles**, which has multiple nested attributes that are **Content Blocks**, which can be one of s...


7 posts Gravatar

Error updating nokogiri and autoprefixer using Capistrano -- local/production gem mismatch

General • Asked by Lance Williams

I've been using Capistrano to deploy my rails app and I've come across an issue trying to update 2 gems. Below at the bottom is the message I get for nokogiri. The other gem I'm trying to update on...


5 posts Gravatar

5.0.1 out of RC?

Rails • Asked by Alan Reid

I just did a `bundle update` and my app updated to Rails 5.0.1, it looks like this may have come out of RC. However there is nothing on their site yet. However their github is stating the buuld is ...


18 posts Gravatar

SEEKING FREELANCER - Javascript configuration

Javascript • Asked by Melanie

I have been trying for 4 years and 3 months to try to setup a basic rails app. I have bought 10+ books, subscribed to this and several ohter subscription services to try to learn the basics of r...