Why does my bootstrap not work across the application. Rails 5

0
Rails
I'm starting a project with rails 5 and the first thing I did was add the bootstrap to rails 5. I added the gem and imported it into application.scss. I generated a devise Admin and the bootstrap w...
Thomaz Wanderbruck Schmidt posted

How to model a company that can be both customer and supplier.

0
Rails
Good morning all, I am creating an application for managing customer and supplier proformas and customer and supplier invoices. I would like you to give me an idea of how to model the company entit...
francel.webdev posted

How do I send a javascript array to my controller?

0
Rails
Hello everyone, is there any way I can send a javascript array straight to my rails controller? Thx!
Eduardo Trintin posted

How to validate model attribute

0
Rails
Hello everyone, question. I have the following code: class Country < ActiveRecord::Base has_many :cities, dependent: :destroy accepts_nested_attributes_for :cities end class City < Act...
Harris Mariano posted

Install Ruby On Rails on Mac OS X 10.15 Catalina (Issue)

3
Rails
I ran this command: **rails new myapp** I got this output: > Overwrite /Users/woodbineone/myapp/.gitignore? (enter "h" for help) [Ynaqdhm] > force .gitignore > conflict Gemf...
WoodbineOne replied

How to relate such as tables of a scaffold and a model and presentation of data in the show.html.erb view of the scaffold. Rails.

3
Rails
I am making a patient control system where I have the following tables that I need to list and present the data on the show.html.erb of patients. I created a patient scaffold with the following da...
Chris Oliver replied

How do I do multiple uploads in Active Storage?

0
Rails
Hi there, I am following this tutorial to do multiple file uploads with DropboxJS but I don't know how to get multiple images belonging to a model to show in the 'show' page. Only one image shows ...
Arthur Truong posted

How do I use Devise in normal AND API mode

0
Rails
Hi guys, I want to use Devise for creating users with mobile app via REST API but I also want use it in classic fashion. So in API I want to return JSON and appropriate HTTP codes. Also I want to i...
Jaroslav Horák posted

Showing online users in chatroom sidebar

0
Rails
Hi I am building a website ("All-In-One") with articles publishing and a chatroom. The basic is done and apparently, everything works. So, now I'm working on better styling and details. here is the...
Bina Darabzand posted

Doing multiple uploads with Active Storage

0
Rails
Hi there, I am following this tutorial to do multiple file uploads with DropboxJS but I don't know how to get multiple images belonging to a model to show in the 'show' page. Only one image shows ...
Arthur Truong posted

Migration issues

0
Rails
Can I know when I run "rails db:migrate" its updating mysql and schema but not in migration folder files. Also "rails db:migrate VERSION=0" is not working...
Semicolon posted

Is it a good practice to call third party api before every controller action?

4
Rails
Is it a good practice if we can call a REST api on `before_action` hook of `application_controller.rb` and store the response in helper method? My Scenario is that I wanna call an API from another...
Ali Ahmed replied
Solved

Draper Gem or explicitly use Decorators and Presenters?

0
Rails
Hi, my question is simple that sometimes I have to extend my model with methods that are usually for more advance business logics and sometimes I need some methods that are used in views (not speci...
Ali Ahmed posted

How to make rails associations work

1
Rails
I have this set up, but noting gets saved to the db when I try to save a practitioner. The tables are users, clinics and practitioners. The user should be able to create multiple clinics and each c...
Kasper Valentin replied
Solved

How to version model validations for an API?

1
Rails
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 or if we remove some part of the res...
Chris Oliver replied

How do I sort fields for and include a new fields for entry?

1
Rails
Sorry for the confusing question, I couldn't think of a better way to phrase it. I have a 'Prospect' model that accepts nested attributes for 'prospect_calls'. When editing the prospect I need to...
William Jones replied
Solved

How to Set Up a Stripe Scheduled Subscription with an option for Deposit but with only X months to Pay the Balance?

6
Rails
I am creating a Stripe product that gives the buyer an option to put a deposit down then they are given x amount of months to pay. Or they can pay in full. I'm sure that I would use scheduled subsc...
Jim Miller replied
Solved

Device application authentication via access and secret keys

0
Rails
I have been watching about the [How to buil apis with rails series](https://gorails.com/series/how-to-build-apis-with-rails) as a reference on how to create an API. Though I'm wondering on how can ...
norman santiago posted

Show time only in form input

0
Rails
I'm trying to display only the time in the edit form on my application, but I'm getting this: 2000-01-01 01:00:00 UTC What I want is this: 01:00 How can I achieve this? thanks in advance P.S.:...
Francisco Muñoz posted

Rails actioncable registered connection issue

0
Rails
I'm implementing ActionCable in my Rails app. I'm facing an issue with Registered Connection error. I'm using MongoID in my Rails app. Here is my `connection.rb` ``` module ApplicationCable cla...
Lee Terng Gio posted

Want to stay up-to-date with Ruby on Rails?

Join 92,170+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.