Running only a part of a huge (2000+) specs suite

2
Testing
I'm working on a Rails app with 2000+ feature specs. That's a lot and takes 45+ min to run (8min when running in parallel containers). What are the strategies to speed this up? Is there a smart wa...
karatepicke replied

Any Rails code documentation best practices? Yard vs Rdoc?

0
Rails
Main question: I've been looking into documenting my own code, and came across Yard and Rdoc. Right now, just trying it out, I have Yard installed. But are there other alternatives out there that I...
Yi Mei Wang posted

Which is the best place to put a custom validator class ?

1
Rails
For a custom validator like in https://guides.rubyonrails.org/active_record_validations.html#custom-validators Maybe `app/validators` ? Maybe `app/models` ? Some other place?
Chris Oliver replied

integrating stimulus with ruby on rails

1
Ruby
Where does the Stimulus team recommend as best practice to put the JS controller files? For example, if I wanted to integrate a version of this walkthrough into an existing rails app?
Chris Oliver replied

Rails bootsnap-compile-cache and other files all of a sudden appears

2
Rails
Hi everyone,I am a bit confused; whether I am using Rails 5.1.4 or upgrading to 5.2.0.rc1 (Ruby version is 2.5.0) a lot of new files have all of a sudden appeared in my apps and I am unsure of the ...
Jacob Hedengren replied
Solved

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

3
General
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 ther...
Félix Landry-Audet replied
Solved

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

0
General
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'@'local...
Damon Delcoro posted

CoffeeScript Class + Partial remotly reloaded + Binding

4
General
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 with...
Chris Oliver replied

CloudFlare Turnstile Captchas in Rails Discussion

2
General
You should really create a gem for this. Or maybe I should? :)
Gintaras Sakalauskas replied

Deploy Ubuntu 16.04 Xenial Xerus Discussion

91
General
This is not working on Xenial Xerus because there is no packages for Ubuntu 16.04 in Phusion Passenger repositores yet.
Alex Hendershott replied

Converting a regular coordinate system to the dimensions of an Android View

3
Javascript
I am trying to convert a regular coordinate system to a default android view After understanding the android view coordinates came to know that the gesture value of the coordinate is (0,0) at the ...

Rails view_components

16
Rails
Are there any plans on covering view_components? It would be great to see a few episodes on using view_components + tailwind / bootstrap + stimulus & stimulus reflex. Maybe the twitter example...
William Cunningham replied

What are the pros/cons and considerations that should be taken in separating your mostly static front facing website from your web app in rails?

4
General
I am in the process of building a rails app and I am unsure if I need to separate my front facing mostly static website from my web application. I see lots of example of sites having there front fa...
ChristianThompson replied
Solved

Pattern for Managing Third Party Integrations

2
Rails
I'm building a small internal app that is essentially glue between several open APIs. Namely, QuickBooks, G Suite, Stripe, and Twilio. Authorizing these third party integrations, maintaining toke...
William Kennedy replied

How do I use phonelib gem for a nested resource?

0
Rails
I am setting up telephone validation for a Lead model. Leads have a field called :phone. I'm using phonelib to validate the contents of that field. My New Lead form is nested within a second model,...
Seth posted

Urgent question

0
General
I'm new to rails and can list any questions, hope to be looking for help in the right place. I need to embed an IFRAME in the SHOW of my app, but it doesn't obey. There is simply no content in the ...
Roseiro posted

Rails6 autorization method

1
Rails
I am going to start my new project on rails6. But when i am usign declarative_authorization gem i am facing issues. can you suggest any method for authorization?
Chris Oliver replied
Solved

Using Rails API for Angular and iOS, with authentication

0
Rails
We have a Rails API that was used with Angular, we previously used the devise angular authentication plugin. With our new iOS app, we're having difficult trying to figure out how to integrate rail...
Jake Meier posted

create.js.erb with Content Security Policy

0
Javascript
Hello, I'm researching best practices on implementing a Content Security Policy for my 5.2 rails app. I have a few `remote: true` forms that respond with `*.js.erb.` It's my understanding that thes...
computer_smile posted

How do I make certain partials show everywhere (ie navbar)?

2
General
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 conversat...
Jacob Montgomery replied
Solved

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

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

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