Nested preference settings with activerecord store

2
Rails
As per this [Episode 191][1] is there any way I can add nested settings? for example: ``` { "wants_reminders": true, "wants_deals_offers": true, "subscribed_to_newsletter": true, "something_here":...
Chris Oliver replied
Solved

splitting asset pipeline for front and backend

1
Rails
app has a consumer facing part and large backend/CMS part. our assets (JS and SCSS) are precompiled into a very large file in layouts we have a different layout for front- and backend Is it possib...
Yi Mei Wang replied
Solved

Have you taken the 2020 Ruby on Rails Developer Community survey, yet?

1
Rails
This is more of an invite. We're conducting our bi-annual Rails survey where we dig into some details on versions being used, hosting environments gem usage, third-party services, etc.. so that we ...
Chris Oliver replied

How can I force cloudfront assets to use http2?

0
Rails
in our app we have an image library which stores images in S3 linked to cloudfront. cloudfront configured for http2 server is puma + nginx problem is performance seems like all assets served from c...
Peter vande Put posted

how i can manage links , create new links , modify exiting links ?

1
Rails
hey guys , when i generate a scaffold the default link of edit it's link like this edit_participation_path(participation) , in my case i need to change the edit to changer_participation_path(partic...
Chris Oliver replied

How i put a link or button to back to the last search in a form with method GET

1
Rails
Hi, I got a form through GET to search employees, when this give me a result through some filters (code, name, status), i can go to one employee in particular, but before i see the show page of thi...
Chris Oliver replied

When installing Rails 6 on Ubuntu 20.04 I get an error with the Nokogiri gem

1
Rails
I have been following the instructions at https://gorails.com/setup/ubuntu/20.04#ruby-rbenv. I get the following error, Installing nokogiri 1.10.9 with native extensions Gem::Ext::BuildError: ERRO...
William Jones replied
Solved

Sidekiq file access

0
Rails
I have an application on Heroku that has a Postgres database and sidekiq running on a hosted Redis instance. A tool I want to rely on is able to generate JSON output when an output file is specifi...
Cheerio posted

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

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

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

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

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

How to integrate ransack and datatables in rails app?

0
Rails
In my project there is datatables, using ---gem 'jquery-datatables-rails'--gem 'ajax-datatables-rails', '0.4.3'-- . Now my client need to add ransack to it. Ransack worked well with normal table. B...
Emmanu Varghese posted

Is there a "Rails" way to batch process API requests?

2
Rails
I have a situation where I'm generating N post requests for given table in a vuejs app, but sending them to the rails controller one by one. I'd like to batch them all up in the app as a JSON obj...
Brian Carpenter replied
Solved

Question regarding the threaded comments! Post titles or link_to post only if the current user is on another users show page.

2
Rails
Hey there all, Would anyone know how you could go about linking to the commented on post? For example if you had a view on the users views for comments.. Listing all the comments by the user how ...
Alex replied

How do you handle the Sitemap for a user generated content website like a social media network?

2
Rails
I want Google to index my dynamic sitemap that gets updated every time a user creates a record
Chris Oliver replied

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.