Save 36% for Black Friday! Learn more

Ruby on Rails Community Forum

The best way to use permissions in serializers

0
Rails
I want to show the attrib, using cancancan in serializer model, it is possible ? what is the good practices for that, thanks !
Jose Aguirre posted

How do I post a client ID in a different controllers view?

1
Rails
Hello, I am so very new to Rails that my question might seem odd. But I will try to be as explicit as possible. I have a controller named clients, It shows <%= @client.client_identifier %> - ...
Simon Cooper replied

Using webpacker in Rails Engines?

6
Rails
I'm making a pluggable CMS engine and want to keep the JS/CSS (preferably by writing Tailwind components) in the engine. It works great with models, controllers, routes and the asset pipeline, but ...
Angel Garcia replied

Check if class was instantiated and instance method was called

1
Testing
Hey guys! I'd like to figure out a way to test piece of code that suppose to create an instance of particular class. Here is an example: ``` ruby class Subject def call ... end end class ...
Alex Musayev replied
Solved

How to manage upstream with ssl?

0
Rails
I am trying to deploy with nginx puma using upstream so should i use ssl connection with my upstream https://my_app upstream my_app { server 127.0.0.1:9292; # or the port you co...
naveen kumar posted

How do i implement load more comments or reply

1
Ruby
Chris i followed your series on implementing commenting systeming using polymorphic is true. Now that i got that implemented. i want to know how do i make this work with will paginate for example.....
khemlall mangal replied

Saas-Mixins

1
Ruby
I am getting an error **undefined mixin display** while executing solidus multi_domain in my ruby application. Please can anyon help me out..
Alan Reid replied

Setup for roles and authorization

7
Gems / Libraries
Hi all! This is my first question for the community. I'm super excited to be here and hope to be answering a few of them myself as well. I'm working on a rails project where people can work on a ...
Jacob Montgomery replied
Solved

Multitenancy with different account types

0
Rails
I'm just getting started on a multitenant application for the lending / finance space. I've looked into Apartment, Milia, Act_as_tenant, etc. but none seemed to really fit what I'm trying to do. ...
Robert Farese posted

Implementing global app settings

3
Rails
I am wondering what the best way to go about setting up Settings for an application. Settings will consist of name, address, phone number, and some other project specific entries. What has me a lit...
RJ McCollam replied
Solved

How do I pass an id to a foreign controller?

2
Rails
A very basic question I know, but I'm really struggling. If I use a link_to with the current controller's path then I get the id as a parameter but if I instead use a path to a different controller...
Robert Farese replied

Download large files from an external server with permissions

1
Rails
I have a rails application that requires file downloading. To download the files, permission is required - in this case only a logged in user can download the files. Currently, this is working as t...
Robert Farese replied

Error with the Scheduled Posts Episode

4
General
I've jsut been going through the https://gorails.com/episodes/scheduling-posts episode, but have ran into the issue of `undefined method 'published_at?'` in my helper, when I try to load the new fo...
Simon Cooper replied

Logic on nested forms/related tables

2
Databases
I'm trying to improve my modles for an existing scenario, but I just can't get my head around it. The situation is that I want to list a range of coffee's and include the country and region of the...
Simon Cooper replied

Why CKeditor is not working in production?!

2
Rails
Hi guys, I'm using CK editor in my rails 5 app and when I deoployed it on Digital Ocean and the editor doesn't load with this error in the console. ``` ReferenceError: CKEDITOR is not defined ``` ...
Muhammad replied
Solved

Hatch login Error

1
General
Hi Chris, I incorrectly set up Two-factor Authentication (enabled) on my Hatch Box Account , now I cant login. Please Assist
Chris Oliver replied
Solved

How do I fix a route -- trying to do an Edit/Update

0
Rails
I'm getting the following error when editing and then updating a blog post: *From Chrome Browser* "No route matches [PATCH] "/authors/posts" ***From Rails Server (command line)*** ActionControlle...
Royal Summers posted

How to Setup Multiple User Models using one login with Devise.

1
Rails
Hi Chris I joined GoRails just recently and am excited to learn more about Rails. I have an app that has 3 different users ( vendor, couple and admin) and each user has their own Dashboard and au...
Alan Reid replied

Have filed entry populate fields in two tables - Nested Forms?

2
Rails
I have two models, Gins and Distillery. At the moment, these are two completely seperate models, but I have been thinking that as a user adds a a new Gin and inputs it's distillery, this could als...
Simon Cooper replied

Issue with Capybara file uploads testing

0
Testing
Hello! I have issue with uploading files by Capybara Rspec Selenium. Here is more details about it: https://stackoverflow.com/questions/48499129/capybara-upload-images-issue Please help!
Anton Storchak posted

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.