Use fetch to pass variable in rails
I am creating an app in Rails with Reactjs. I want to pass the value of input field to the controller as a variable so that I can use that variable in def create. How can I do that with fetch?
Sulekha
posted
1
Rails
Passing ActiveRecord Relation object to params?
In my controller code, under :index action, I have this sample code
@obj = UserSource.select('user.source_categories.code as category_code,
user.source_categories.name as cate...
MH
posted
1
Rails
Should I continue using Rails 5 or should i use Rails 6?
Nice. Thanks so much Chris!
Joan Gabun
replied
ā¢
Solved
3
Rails
Import into administrate?
You're welcome! Glad that worked out pretty easily!
Chris Oliver
replied
9
Rails
Rails/Sendgrid messages are blocked by receiver's servers
Check out what DMARC is, it's the reason your emails are being blocked. https://dmarc.org/
Basically, they're not allowing these emails because they know they didn't originate from the correct ser...
Chris Oliver
replied
ā¢
Solved
2
Rails
Cookie Replay Attack
Rails guides talk a bit about how you solve this: https://guides.rubyonrails.org/security.html#replay-attacks-for-cookiestore-sessions
Chris Oliver
replied
2
Rails
Actiontext used for templates/placeholders
I've got a little business finance management app and I'd love my users to be able to create their own custom templates for quotes/invoices. The way all my competitors do it is through merge fields...
Tim Dowling
posted
1
Rails
How to Access rails User session into Laravel Application?
Hello,
I have developed two Application one is main website which have all business logic's and functionality in ROR and second is my marketing website which i have developed in Laravel. Now i wan...
HardikShah47
posted
1
Rails
Can't resolve image into URL: undefined method `attachment_url' for #<#<Class:0x0 ...
Fixed ššš„³
check : https://stackoverflow.com/questions/61715426/cant-resolve-image-into-url-undefined-method-attachment-url-for-class0x0
almokhtar
replied
2
Rails
Struggling with active nav tabs setting active class
I have an issue I haven't been able to solve. I have a products page set up with some different sections via bootstrap 4 nav tabs. General Info, Images, Pricing etc. I am trying to make it so that ...
spacerobotTR
posted
1
Rails
How do I calculate a computed value in a model when showing or indexing over that model in its controller?
After sleeping on it, I believe the best way (and the way that requires the fewest queries to Cloud Firestore) is to just download the whole Firestore DB and update from that object every 10 or so ...
Jordan T-H
replied
ā¢
Solved
2
Rails
Working with ActiveRecord and Google Cloud Firestore
Not sure what the etiquette is for answering or following up one's own question, but I ended up modeling this, because I realized I need some pretty complicated and persistent logic for each docume...
Jordan T-H
replied
ā¢
Solved
2
Rails
How can i switch to slave database in case of master fail?
I have 2 MySQL instances. One is master and the second is a slave. I want to configure the rails app in a way that if the connection to my master database failed, then auto-connect to the slave dat...
hetal sharma
posted
1
Rails
How to destroy file with shrine when associated model has deleted ?
hi, someone knows how to delete an uploader file with shrine when the associated model is deleted like purge_later from active_storage.
francel.webdev
posted
1
Rails
Encrypting ActiveText contents using Symmetric Encryption
Hey there,
Iām using ActiveText, using the Trix editor, in one of my fields in my model. The model in question has the correct attribute:
```
has_rich_text :content
```
However, Iām looking at a w...
Vincent
posted
1
Rails
Generic Infinite Scrolling
Dont use Offset!! Offset is not just skipping records but instead loading them but not displaying them. so if you would do offset: 500 to display just one records, every 501 records would be loaded.
Gabriel
replied
4
Rails
Get Email from DataBase for creating newsletter
So would it look something like this? I'm confused as to where the program takes the email from the database as there isn't a user defined.
class LeadMailer.with(lead: @lead).new_lead.deliver_lat...
Derek Levine
replied
3
Rails
How to send checkbox ids to modal pop up using stimulus js?
I have got list of items with checkbox on the left side of each row having id of that particular row. How can I send the ids of items to the modal
using stimulus js so that I can display brief deta...
Animesh Dash
posted
1
Rails
Heroku RedisCloud connexions on "Realtime Online User Tracking with ActionCable"
Hi all,
I'm running in a weird issue.
Following the Realtime Online User Tracking with ActionCable screencast, in an app using rails 5.2 I used:
```ruby
ActionCable.server.pubsub.redis_connection_...
Nathan Chalot
posted
1
Rails