Ruby on Rails Community Forum

How do I apply a Pundit Policy to Index?

1
Rails
I'd like to have an index page show only the associated (from the parent, location) records, and allow only users that own those records to see the index.  I am really struggling with this con...
Rich Smith replied

What database should I use?

1
Databases
I would like to create a database to store how often access tokens in my system are being used.I was thinking of a data model like so -Access Tokenfrom (basically I will store this hourly, so this ...
saravanagumar replied

Access local variable in partial

0
Rails
Hi there,I'm working on a budgeting section of a graphic designer web and I created the following model hierarchy:general_budget.rbclass GeneralBudget < ActiveRecord::Base has_many :budgets ...
Javier Bonet posted

URGENT! How do I solve the following error?

1
Rails
I am trying to run a test using rspec and I am getting the following error. Please help.ReactOnRails: Set generated_assets_dir to default: public/webpack/developmentrake aborted!NameError: undefine...
Taylor Cooney replied

How do I access an attribute from a background worker (Stripe charge_id)?

1
Rails
I managed to get Stripe working and processing Jobs, where a user must pay a one-time charge in order to create a Job record. After putting the call to `Stripe::Charge.create` in a background ...
Taylor Cooney replied

Simple form survey and dashboard illustration

1
Rails
Hi I'm new to Ruby and Ruby on Rails and are still in my learning phase. I know HTML and CSS from working with wordpress for some years. As a test-app to challenge myself I thought I want...
Chris Oliver replied

How do I ask people to complete profile before continuing?

0
Rails
I have an app with Devise Users and they can sign up. Once they are signed in I want them to complete there profile before they can use the app.Anyone done this? and whats the best way to go about ...
Stephen Sizer posted

Thoughts on the best way to upload images via Vuejs front end with Rails 5.2 API backend

0
Javascript
I have an app I've just updated to Rails 5.2 and migrated away from Paperclip for image uploads to S3 to the new ActiveStorage feature.  I am able to display some uploaded photos I did with th...
Simon Cooper posted

Hatchbox CLI

0
General
Hi Chris, when are you adding the CLI Feature like heroku one on hatchbox  ?
Felender Hlungwani posted

Is the adoption of Ruby on Rails in decline? Proving it wrong with Pagy

0
Rails
Did Ruby on Rails reach its full potential in 2015? Is the adoption of the platform in decline? As the numbers decline, let me show why Pagy matters. You can read everything about it at the followi...
Sandro Cantante posted

Can anyone see the error here?

3
Rails
NameError in RecipesController#newuninitialized constant RecipesController::Categorydef new @recipe = current_user.recipes.build @categories = Category.all.map{ |c| [c.name, c.id] } <-...
Jacob Montgomery replied

Getting Simple Calendar to show local date and time

5
Rails
I have been using your Simple Calendar gem and it is all working great. The only problem is I can not figure out how to fix the date and time so it will show everything in local date and time. Righ...
Antonio Santoni replied

Enable HTTPS SSL in rails localhost

4
Rails
Good day, i tried to enable https secure connection for my rails application.First of all, set config.force_ssl = true in application.rb only. So, re-started rails server, but there was error: "HTT...
Bilal Abbas replied

Encrypted Credentials in Rails 5.2 with Cloud9

0
Rails
Does anyone know what the [ EDITOR="cloud9 --wait" ] code is for Cloud9 so that I can edit the credentials?
Ryan Carter posted

How to render ssh output

4
Javascript
Might be a basic question, but I can't seem to find any good info elsewhere. Hatchbox has an awesome feature that shows ssh output during deployments and I have a couple of projects that I'd like t...
Quentin Robinson replied

How to structure DB in such a way that we can create attributes dynamically in rails

0
Databases
Hi I am trying to create for example a contact model but currently i only know of for example first name, last name and email but would want to give the user a choice of entering more custom f...
Anand Duddella posted

Connect Rails Application to already existing MySql Database

1
Databases
Hi there, I am new to Rails and really enjoying it. I am converting my php application to a ROR application. The app is using a MySql DB, so I want to connect the ROR application with that alr...
Thomas R. Koll replied

REACT on RAILS - issue with data loading

0
Rails
I am having an issue with data loading after I add a favorite from a search page. It seems that I need to had some kind of fetch to the addFavorite function, so it knows I need to get the updated f...
ME Hoagland posted

amadeus gds , sabree gds

0
General
Hi Chrishave you covered any tutorial on how to integrate flight module api  like amadeus  or  sabree gds in a ruby on rails web app? thanks
abdul-samme posted

Suggestion: A 'Testing Vue components in Rails' episode

1
Javascript
Alternativel you can just answer here "How would you test a Vue component in Rails?"Loving the Vue vids so far, but it would be great to hear your thoughts on testing the front end. Would this be a...
Jake Anderson replied

Learning Ruby on Rails? Join our newsletter.

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