Save 36% for Black Friday! Learn more

Ruby on Rails Community Forum

How do I reindex all posts in Searchkick / Elasticsearch?

0
Rails
Hey, I discovered a problem with Rails app. When I run `rails db:seed`, I generate 10 posts and store them in the database. I also have an API where I pull data as JSON, which gets parsed and data ...

How do I generate and store the state parameter for OAuth?

0
General
``` https://authorization-server.com/oauth/authorize ?client_id=a17c21ed &response_type=code &state=5ca75bd30 &redirect_uri=https%3A%2F%2Fexample-app.com%2Fauth &scope=photos ``` T...

How do I add Webpack config to Rails?

0
Rails
I'm following the installation guide of Vuetify and it requires me to add the following to `webpack.config.js` but since Rails has no such file, how should I go about adding these rules? ``` modul...

Is there a acts_as_taggable gem that works on Rails 6?

1
Gems / Libraries
The acts_as_taggable gem only supports upto rails 5. Appologies if this is a stupid question. Thanks, Gerard
Chris Oliver replied

How do I have a Vue.js navbar stay on the page between page navigations?

0
Gems / Libraries
I built a lovely Navbar in Tailwind CSS in my rails app following a tutorial by Adam Wathan which uses Vue.js for the javascript behavior on dropdowns. I added Vue.js the way Chris suggests here,...
James Devereux posted

embed youtube in actiontext?

2
General
Chris, I see you already referred to the problem of embedding Youtube videos in actiontext https://github.com/excid3/cfps/blob/3bed21b7aa319ce8e0a98283965ab64df2597488/2020-railsconf.md Did you m...
ya na yandex replied
Solved

rails test attempts to create multiple test databases and fails because it cannot connect

1
Testing
rails 6.0 minitest 5.1 mysql2 gem I'm having (what seems to me) a rather peculiar problem running **rails test** right from the get-go. All the correct databases exist, the rails user has what sh...
Ian Burry replied
Solved

Using custom scaffold templates for Rails models and controllers?

1
Rails
After getting tired of rebuilding all my default scaffold models, views and controllers I decided to create custom templates as outlines on various blogs / SA questions etc. I created: /lib/t...
Dan Tappin replied
Solved

Rails - adding nested attributes then validation fails, new nested attributes are not passed back to the :edit render

1
Rails
I have a Rails app with nested attributes. My MVC works great except when the nested validation fails. Here is my parent model controller: def update if @model.update(model_params) re...
Dan Tappin replied
Solved

Group Chat with ActionCable: Part 3 Discussion

23
General
Chris,Would it be possible to have one on Map APIs like mapbox or google maps api please :)Omar
Richard Ludwig replied

Getting back into Rails

2
General
I have been away from Rails for about three years now and I have been trying to get level back up my knowledge. What suggestions does everyone have relearning the Rails ecosystem? What is the best ...
Andrew Schutt replied

How do I make use of API Keys?

0
Rails
Use Case:- I am trying to store API keys via a form and encrypt it to store in the database. My Config has a file that needs that API key to access a third-party API. How do I configure the Config...

Issue deploying Rails app with capistrano

1
Rails
Hello all. This is my first time ever trying to deploy a Rails application. I followed the guide to do so on Ubuntu 20.04, but I run the command `bundle exec cap production deploy` and it gets to t...
William Kennedy replied
Solved

How do you make a tab stay "active" after a page reload

6
Javascript
I have a version of your [Tabs tailwindcss-stimulus component](https://github.com/excid3/tailwindcss-stimulus-components/blob/master/src/tabs.js) up and running. However, I'm struggling to figure o...
Christian Whitesides replied
Solved

How can I render \\n as newlines in <pre><code> elements?

2
Ruby
I need to render the post's body as HTML, but as it is given to me, it has some "\\n", "\\r" and "\\t" characters. How can I replace them with newlines, carriage return and tab characters respectiv...
Solved

Disabling a tenant in a Multi-tenancy Saas app with apartment

3
Rails
Hey everyone, I was launching a multi-tenant app and want to know if there is a way through which we can disable a tenant if they cancel the subscription without deleting their data. I can add thi...
Solved

Acts_As_Tentant User have access to many tenants

6
General
I've just created this enhancement for acts_as_tenant and wondering if anyone else would find this useful - https://github.com/ErwinM/acts_as_tenant/issues/231 Currently acts_as_tenant expects a s...
Chris Oliver replied
Solved

Soft Delete with Paranoia Discussion

18
General
Great episode. Thanks, Chris!
Jason Ackerman replied

Go Rails' Stripe lesson and strong params

3
Rails
Hello, I recently watched the [Go Rails Stripe tutorial](https://gorails.com/episodes/stripe). In it, Chris creates subscriptions like this: ```rb def create_subscription customer = # set custo...
Brian Carpenter replied
Solved

Do I still need to keep a record of Invoice and Receipts in my app if I integrate with Stripe payment?

0
General
I'm planning to integrate my app with Stripe payment gateway, but and looking from their dashboard and some docs, it seems like they already help you with issuing receipts and invoices. In that cas...
Yi Mei Wang posted

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.