Skip to main content
API params validation in Rails app
Rails Solved • Asked by Alex Musayev
Hey guys! I'm wondering, what could be a good and scalable way to validate if API request is well formed, before processing it. Rails has strong params for that, but I have a case when an API en...
3
posts

How do I get avatar.variant(resize: “200x200”) on Rails 5 to work using aws on production?
General Solved • Asked by Luis Daniel Fonseca
I can't get user.avatar.variant(resize: "200x200") to work while using a cloud provider in production because it uses my website path instead of aws. ``` # Current Output # Should be ...
4
posts

How to import javascript from Gems with webpacker
Ruby Solved • Asked by Alex Deering
Ive come across an issue where some gems I want to use (specifically social-share-button) need to have a javascript file imported but with webpacker in rails 6, not quite sure how to do that now
4
posts

How do I store users’ API keys for 3rd party services
General Solved • Asked by Yi Mei Wang
So I am working on a multitenancy app that needs to store users' API keys for 3rd party services, but given that these are rather sensitive information, I imagine I should have some form of securit...
3
posts

Install Bootstrap with Webpack with Rails 6 Beta
Javascript Solved • Asked by Shawn Wilson
For those of you who are going to give Rails 6 Beta a test run here is how I have installed Bootstrap 4.3.1 and configured with Webpack **Step 1:** `yarn add [email protected] jquery popper.js` ...
13
posts

How do I install UIKit via yarn?
CSS Solved • Asked by Tabish Iqbal
Answer: 1. Add uikit through yarn: yarn add uikit 2. Create a file to be transpiled by webpacker: app/javascript/uikit.sass (or app.sass... whichever name suits you best.) 3. Within uikit.sass...
1
post

How can i Configure my Trix Editor / ActionText field?
General Solved • Asked by will
Is there a way to add / delete buttons from the tool bar for action_text? For eg, I'd like to add more semantic header levels (h2-h4).
3
posts

Javascript not executing
Javascript Solved • Asked by Paul Stutler
I viewed the easyAutocomplete video, which was great. I have the DB query and JSON assembly working. And the Javascript loads into the browser (Chrome DevTools let's me inspect it). But it never tr...
2
posts

Devise on Heroku
Rails Solved • Asked by Moses Gathuku
Hello, I have been implementing device JWT with rails 6.0 API . I have used this callback to protect from fogery requests, On the applicationController ``` protect_from_forgery unless: -> { re...
1
post

Thoughts on adding non-standard REST actions to a resource?
Rails Solved • Asked by Dan LeGrand
I have a `milestone` resouce that can be activated/deactivated as well as completed/reopened. Rails pushes the standard 7 actions in your controllers: index, new, create, show, edit, update, des...
5
posts

How do I use easyautocomplete in rails 6?
Rails Solved • Asked by Christopher
I tried adding it with yarn and through rails assets but nothings seems to work.
7
posts

Beginner Tutorial in Rails6.0
General Solved • Asked by Christopher Slade
I am a CS Professor who teaches a web application class in Rails. I created a series of videos for my class. I want to make them publically avaliable for free. (I do not receive money on YouTube fo...
1
post

I joined GitHub Education
Tips Solved • Asked by Nicolás Bobb
I joined GitHub Education. How can I validate the account in Gorails to take advantage of the benefit?
3
posts

jquery doesn't work in js.erb file
Rails Solved • Asked by Christopher
Hey I'm working on an rails 6 application and try to render an partial in an js.erb file but get this error in the chrome console: > Uncaught TypeError: Cannot read property 'append' of null ...
3
posts

Rails 6 Form remote: true Error
General Solved • Asked by Steven Torrence
Hi, all! I am following along with the video on how to make a chat application using action cable. In the video, I believe Rails 5 is being used, however, I wanted to try it out with Rails 6. ...
1
post

How to display checkbox and string fields like this image in a form?
Rails Solved • Asked by Daniel Weaver
I have a `spectrum` boolean column and a `spectrum_color` string column and I'd like to display the options to user as shown in this image. I'm using Tailwind CSS and the Jumpstart Pro Rails templa...
6
posts

Parsing a Ruby hash sent to a Javascript API
Javascript Solved • Asked by Daniel Weaver
Sending data from Rails via HTTParty to a Node endpoint: `params = { str: "word", bool: true, hash: { number: 123 } }` `result = HTTParty.get("http://localhost/test.js", query: params)` It w...
2
posts

Is this a good fit for storing JSON in database?
General Solved • Asked by Daniel Weaver
I've got a Video model that represents a video created by the user. During creation of a video a couple of filters with different options can be applied to the video. Currently only 2 but I'll be a...
3
posts

Rails loading time
Rails Solved • Asked by Hagi lerman
1. I just installed the a new rails version 6 and using ruby -version ruby 2.6.3-p62. I create a new 2. project 'rails new my_new_app' 3. bundle install 4. rails server ![rails respose time...
1
post

How do I update a page (a row on a table) dynamically?
Rails Solved • Asked by Arjun Rajkumar
I have a page which displays all the products in a shop. Each time a new product is added - two things happen. 1) The user is taken to the products/index page which shows a list of all the pro...
2
posts

Subscribe to the newsletter

Join 27,623+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.