grouped_options_for_select --- include a select all

0
Rails
Hi, I have Categories and CategoryType. A Category has_many CategoryTypes. In my form, I am using grouped_options_for_select to display the different category types for a category. Form: ...
Amanda posted

Refreshing the page with form errors

2
Rails
Hey all. Currently building a project with rails and so far really enjoying it. I've been using php & laravel for a long time and let me say ruby and rails are quite refreshing. In laravel wh...
Chris Oliver replied

Trix issue driving me crazy

2
Rails
Hey folx, I've been banging my head against the wall for the past two days, and I'm at this stage where it's time to ask smarter guys than me (cough, cough Chris) to help me out. This is a 7 year...
Marianna Szinek Kenesy replied

How do I override the default link_to helper?

3
Rails
I accept a lot of user input links and output them as anchor tags. As a result, I'm worried that there may be cases of users trying to inject Javascript into the href attribute. I would like to ov...
Chris Oliver replied
Solved

Mailboxer Issue

1
Rails
I setup the Mailboxer gem in my application. Everything was working fine, except a read conversation kept showing up as unread. I decided to run this command in the rails console: [user].mailbox.co...
MicahBHoward replied
Solved

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

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.