Save 36% for Black Friday! Learn more

Rails Ruby on Rails Forum

How do I resolve this error with Stripe checkout on wizard page via wicked gem?

4
Rails
Right now I get this error message when the submit.html.erb loads: **Cannot charge a customer that has no active card.** I want to understand how I can improve my controller. The goal is to not ha...
Robert Hopman replied
Solved

Payments with Stripe Master Class

5
Rails
Hey Chris - I signed up for your payments with Stripe course and "Creating The Checkout Form With Stripe.js" section is really confusing. Basically video three on the New Stripe JS element does eve...
Chris Oliver replied

Issues with paperclip gem on Windows 8

2
Rails
Hi, i am new to rails(**using Windows 8, rails v = 5.1.4 & ruby v= 2.2.6**) and i am having issues with image uploading using paperclip gem, i saw the documentation on github & manually ins...
Pranay Singh replied

Having trouble figuring out net/http and API calls.

3
Rails
Hi folks, I need to make a number of calls to an API, some of which are GET requests and some of which are PUT requests. I've tried to make a common function since there's a bunch of security stuf...
Jacob Montgomery replied

Should scopes be seperated out to allow chaining or be specific to the what you are trying to do?

4
Rails
I am trying to write an internal tender application and am having trouble figuring out the best approach for writing a scope. I have the following models ``` class Tender < ApplicationRecord ...
Jacob Montgomery replied

Architecture for subscription with multiple users per account

1
Rails
Hi all! I developed an app that uses Apartment for multitenancy, Devise for authentication and Pundit for auth. Each tenant is represented by a business (business model), where the id is also the ...
Luca Rossi replied

Is it safe to switch Apartment tenant using session variable to pass the tenant id?

2
Rails
Hello, I know that Rails uses a digest to secure session data, however I wanted to ask whether a better solution could be adopted. I am currently loading the tenant in apartment.rb using a tenant...
Luca Rossi replied

Form not working for polymorphic has_many through association

1
Rails
In my Rails 5.1 app I am trying to create a tagging system from scratch. I have been using the *Comments with Polymorphic Associations* episode as a template. I want `Tags` to be a polymorphic `ha...
Casey Provost replied

Best way to create a report/spam button?

2
Rails
Just looking for ideas on the best way to create a report or spam button/link on posts and comments. And do you typically have that notification sent to an in program inbox to an admin email, etc....
Ryan Carter replied
Solved

How to read database table in Application.rb

0
Rails
I am adding CORS validation in application.rb filw where domain names are given in Environment variable but I want to keep all domain in database table and validate these domain during CORS valid...
Puneet Gaur posted

Rails mongoid connection to remote cluster

0
Rails
I am trying to make a rails 4 application with mongodb (skipping active record). I created a cluster on https://cloud.mongodb.com, which has three hosts. The cluster is accessible in the Mongo Shel...
sommer bareen posted

How do I create a virtual balance model in Rails?

10
Rails
This is for a game application I'm creating. I have a user model, a stock model and a UserStock join table for the previous two models. User was created with devise. I intend to attach a certain ba...
inopinatus replied

Checking for uniqueness

3
Rails
Hi people. I am working on a project that deals with enrollment activities such as generation of subject offerings and such. I have a model called Offering which has a has_many relationship with th...
Ohad Dahan replied

How do I duplicate or move a carrierwave image that's stored on S3?

0
Rails
Media page for controller: User can upload an image. User can also create a folder. I want the user to have the choice to either move or copy the uploaded image into the folder. I've looked around...
Josh Zandman posted

Move a Legacy App in Production to a local Development Environment

6
Rails
I'm working with a legacy Rails app (Ruby 1.9.2 and Rails 3.2.8). The app only exists in production. There isn't a development environmnt or repo I can use to setup my dev environment. I'm on an OS...
Chris Oliver replied
Solved

Companies / Employees / Products

1
Rails
Hi GoRails friends, I have a list of products. Products can be created by users. So far so good. Now, I would like to allow some users to be part of companies (0, 1 or several). One user (the a...
Casey Provost replied

Using migrations to migrate data from one table into another

0
Rails
I have two models user and account linked with each other as following ``` account.rb belongs_to :user user.rb has_many :accounts ``` I want to move the data from column ```name ``` in ```users`...
Shairyar Baig posted

Error message is displayed One to one relationship with Ruby on Rails

1
Rails
Hi Everone, i am trying to create one to one relationship with ruby on rails5. 1. I ahve created the Dubject model in the below format class Subject < ApplicationRecord has_one :page ...
Jacob Montgomery replied

Stripe connect managed accounts

1
Rails
I'm trying to add webhooks to stripe using stripe connect and managed accounts https://stripe.com/docs/connect/webhooks I'm using the stripe_events plugin and have followed your stripe webhooks vi...
josh edgar replied
Solved

Nested has many through... Or is there a better way?

0
Rails
Hi I have 2 models Tender and Group shown below. For a Tender you can add Contractors (contractor_details) and you can also add Groups (groups). Groups also contain contractor_details. This is so...
Stephen Sizer posted

Learning Ruby on Rails? Join our newsletter.

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