[ActiveRecord::RecordInvalid - Validation failed: Blog must exist]
6
Rails
Hi,
trying to sort out this error for a while now, no luck.
I get this error above when adding a new comment for a blogpost. The blog is clearly there. Any insight would be much appreciated.
_...
Solved
CanCanCan, Pagy, and MeiliSearch, How to combine the 3 gems?
5
Rails
I'm working on a project that has Cue model that could be accessed and searched by multiple roles like guest and admin. The authorization happens using CanCanCan gem based on some logic written in ...
Ali Hamdi Ali Fadel replied
Paypal & Stripe
12
Rails
Hi Chris - I just finished your Stripe course, which works great, but my client also wants the PayPal option. I am just wondering if you could share some insight on how you did it on your site?
Al...
lordelaula replied
How do I add embedded youtube video to a text field within active admin with simplemde markdown?
3
Rails
When I add the Youtube embed code. It displays it as a string on the front end.
The idea is that I could make this simple enough for the user updating the post to add the embed code easily themsel...
Is there a beginners course?
7
Rails
Hi I've searched but I cant find a beginners to rails course, am I being blind? Thanks
Active Storage Rails 6 API unable to insert to active_storage_attachments table
1
Rails
I am creating API endpoint for active storage with reactjs. My upload controller is as follows:
The code belows execute:
insert blob object in active_storage_blob - ok
Uploaded file to the design...
garxu21 replied
Business page with cms
5
Rails
Hello,
I'm a beginner rails developer. I wanna do a business page for my friend. The task is to have a business page with cms to management a content, but in this cms admin user should have been a...
Architecture Question - Connecting google books API and voting on favorite book
4
Rails
Hey guys,
I am using the Google books API to pull books and show them on my site. This is working great. However, I want to be able to allow users to favorite books they want to remember and als...
Implement Authentication Service in Rails
2
Rails
Hello,
I'm currently looking for options to create some form of authentication service based on Rails.
I've got several microservices like app1.site.com app2.site.com and app3.site.com and I woul...
holliweb12 replied
Rails API backend with Electron Frontend
5
Rails
I'm working on a SaaS platform that will be heavily API driven with a React or Vue front end. But there's a requirement for a desktop app to give the customer something "tangible" to hold in their...
kavuquj678 replied
How do I return an ActivateStorage blob URL in JSON
2
Rails
In our system we are sending webhook to an endpoint with serialized JSON for the object JobApplication.
The JobApplication has a resume attached using ActiveStorage. ( has_one_attached :resume)
Ho...
Rails App configurations for AWS CodeBuild
1
Rails
I have a rails application that is deployed on `AWS EC2 instance` with `CodePipeline`. I have added the `Build` stage in the pipeline using `AWS CodeBuild` to build test my code.
I have no idea ab...
skooby replied
How do i write a test case using rspec for private method
1
Rails
Hello I,m new to rails
I am writing test cases for using rspec gem
In my controller I have edit function. I have before action for edit function
**This is my controller**
```
before_action :aut...
Kasey Sk replied
How do I display errors messages from devise in the same page?
1
Rails
Hello, Chris!
I have a rails appp, and I'm using Devise (without simple_form).
My registration form is in my homepage, root_path. I followed the tutorial from Devise and I'm able to register users...
sakio replied
video about sortable lists
21
Rails
Hi,
I'm not sure if this is the right place to post this issue, but I'm looking for a way in my Rails app to reorder items by drag and dropping.
I tried to implement the solution by Ryan Bates in...
Chris Oliver replied
Best way to grant a user specific permissions
5
Rails
Trying to determine which way I should handle this.
Normal User adds a post to our system, he then has the ability to update and delete this post. In the future he may assign other users the abili...
Brent C replied
problem with like link in nested resource
3
Rails
Hi Chris im doing the episode 'liking posts' i have difficult to do with deep nested resource,
my actual nested resources looks:
A. Routes:
```ruby
resources :users do
resources :catalog...
Chris Oliver replied
Performance increase over group_by
6
Rails
How can I write the below operation, being handled by _group_by_ Ruby method, in terms of DB specific query?
```ruby
def list_users
@search_by_options = [:age, :location, :department, :desig...
arup rakshit replied
How should I model this situation?
2
Rails
I need to store different metrics about various companies. These will be present for every company:
* revenue
* ebitda
* cash
* receivables
* employees
* debt
each one has attributes such as...
Chris Oliver replied
Associating Radio Buttons With Specific Field Subsets In Rails
1
Rails
**Situation:** A user enters the name of a venue they want to add. I query an external API and get back a list of possible venues they actually meant, which they'll then confirm. The venue model wi...
Chris Oliver replied