EleasticSearch and Indexing Empty Models

2
Gems / Libraries
I have added Elastic Search to my Rails app via the Searchkick gem. I have hit a snag - when I have a model with no records I get these errors: Searchkick::InvalidQueryError: [400] {"error":{...
Dan Tappin replied
Solved

Friendly URL's question

2
Gems / Libraries
Hello, I'm building a small forum for my website and its a very simple app with the schema looking a bit like: Topic -> Forum -> Post So, Topic can be 'Off-Topic' with a Forum called 'Intr...
Chris Oliver replied
Solved

Rails 6, Devise not allowing editing of user without password

2
Gems / Libraries
I've followed the instructions on the [devise wiki](https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-edit-their-account-without-providing-a-password/). I'd like a user to be able...
Matt Bjornson replied
Solved

Active Storage and Subdomains

3
Rails
I have a simple app for photos and wanted to make it a subdomain of a domain I own and use. It would be https://photos.com This seems to break active storage however. Has anyone else ran into a sim...
Chris Oliver replied
Solved

How do I send params from Rails Ajax to the controller???

5
Rails
I am trying to send all the params from the form into my controller after a promise my params include :name , :email , :address_line1, :address_city, :address_state, :address_zipcode, :address_cou...
Chris Oliver replied
Solved

hit

1
Rails
xx
ff replied
Solved

Can not use toast of bootstrap in rails

1
Javascript
I did `yarn add bootstrap jquery popper.js` and import bootstrap into the app. Also, bootstrap's popover and tooltip style works well. But when I add a toast in page and run `$('div.toast').toast('...
Chris Oliver replied
Solved

How do I get avatar.variant(resize: “200x200”) on Rails 5 to work using aws on production?

3
General
I can't get user.avatar.variant(resize: "200x200") to work while using a cloud provider in production because it uses my website path instead of aws. ``` <%= image_tag user.avatar.variant(resiz...
Chris Oliver replied
Solved

How do I store users’ API keys for 3rd party services

2
General
So I am working on a multitenancy app that needs to store users' API keys for 3rd party services, but given that these are rather sensitive information, I imagine I should have some form of securit...
Yi Mei Wang replied
Solved

How can i Configure my Trix Editor / ActionText field?

2
General
Is there a way to add / delete buttons from the tool bar for action_text? For eg, I'd like to add more semantic header levels (h2-h4).
Christopher replied
Solved

Devise on Heroku

0
Rails
Hello, I have been implementing device JWT with rails 6.0 API . I have used this callback to protect from fogery requests, On the applicationController ``` protect_from_forgery unless: -> { requ...
Moses Gathuku posted
Solved

Thoughts on adding non-standard REST actions to a resource?

4
Rails
I have a `milestone` resouce that can be activated/deactivated as well as completed/reopened. Rails pushes the standard 7 actions in your controllers: index, new, create, show, edit, update, destr...
Dan LeGrand replied
Solved

Parsing a Ruby hash sent to a Javascript API

1
Javascript
Sending data from Rails via HTTParty to a Node endpoint: `params = { str: "word", bool: true, hash: { number: 123 } }` `result = HTTParty.get("http://localhost/test.js", query: params)` It works ...
Daniel Weaver replied
Solved

How to display checkbox and string fields like this image in a form?

5
Rails
I have a `spectrum` boolean column and a `spectrum_color` string column and I'd like to display the options to user as shown in this image. I'm using Tailwind CSS and the Jumpstart Pro Rails templa...
Daniel Weaver replied
Solved

Is this a good fit for storing JSON in database?

2
General
I've got a Video model that represents a video created by the user. During creation of a video a couple of filters with different options can be applied to the video. Currently only 2 but I'll be a...
Daniel Weaver replied
Solved

Rails loading time

0
Rails
1. I just installed the a new rails version 6 and using ruby -version ruby 2.6.3-p62. I create a new 2. project 'rails new my_new_app' 3. bundle install 4. rails server ![rails respose time](ib...
Hagi lerman posted
Solved

How do I update a page (a row on a table) dynamically?

1
Rails
I have a page which displays all the products in a shop. Each time a new product is added - two things happen. 1) The user is taken to the products/index page which shows a list of all the produc...
Chris Oliver replied
Solved

How do I add minified JS files to the Rails Webpacker

2
Rails
I am trying to add min.js files - and getting an error. This works while adding a normal .js file: *- app/javascript/packs/calendar.js* alert('Calendar loaded') *-# app/views/calendars/index.ht...
Arjun Rajkumar replied
Solved

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

How do I embed a Rails app into another website?

1
General
Hey! I'm stuck with this - and would love some help. Going to use an example to explain this. Storemapper (https://www.storemapper.com/) was build on Rails. It basically lets you add a store loc...
Chris Oliver replied
Solved

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

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

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