ruby-on-rails-5 Questions

2

Solved

Rails 5.2 introduces the encrypted secrets feature through the usage of the awesome credentials.yml. But I'm struggling to get it to work with Heroku. Is there any Strategy available right now to ...
Strife asked 4/4, 2018 at 23:7

1

In other words, are these two clauses just mirror images of each other? The documentation for form_with isn't clear on this.
Zarf asked 2/11, 2018 at 18:43

2

I have an API only rails app which needs documentation for frontend developers. And it's my first experience with it. What tool do you use for this purpose? Note that I am using rails 5 API...
Helpless asked 9/2, 2018 at 7:38

1

Solved

Im trying to get the last sign in date time in RoR application using Devise gem. In one of my migration files I noticed the # t.datetime :last_sign_in_at field among others: ## Trackable # t.inte...
Dight asked 27/10, 2018 at 16:53

3

Solved

I have models for Users and Sites with a has_many through relaitonship between them. There is one extra piece of data on the sites_users join table is_default which is type boolean with the intenti...
Upwind asked 22/9, 2018 at 13:57

2

Solved

I am trying to deploy ActionCable and Rails 5 To Production server (DigitalOcean). I have followed all steps mention in the Gorails video here: https://gorails.com/episodes/deploy-actioncable-and-r...
Baskerville asked 4/9, 2018 at 23:34

0

I have a model with enum: class MyModel < ApplicationRecord enum my_enum: [:status1, :status2, :status3, :status4] # ......... end I want to field in the database to be titled "status", w...
Auxin asked 24/10, 2018 at 22:44

2

Is there a way to disable a railtie that is loaded by a gem by default ? The developers of the gem did not make it modular and once putting the gem in the Gemfile, the require will automatically l...
Carbonyl asked 5/4, 2018 at 9:3

1

Solved

I would like to test controllers in Rails 5 for which Basic Authentication is activated. The way explained in the current official instruction (as of 2018-10-14) does not work for some reason. The ...

1

Solved

I have a model with one attachment that uses ActiveStorage: class ProofreadDocument < ApplicationRecord has_one_attached :file end I am working on a rake task to attach files to a proofrea...
Sarilda asked 2/10, 2018 at 10:10

2

My Rails 5 schema.rb file has an options: section for each create_table that I do not want. What I have is: create_table "accounts", id: false, force: :cascade, options: "ENGINE=InnoDB DEFAULT CH...
Convertite asked 10/8, 2016 at 16:30

4

Solved

Is change_column method able to rollback when it is used in migrations in Rails 4 and above? Here is an example: def change change_column etc end Should I use up and down methods instead?

1

Solved

I'm using grouped_collection_select in filtering out associated information in a rails 5 form. The first grouped_collection_select works with the Property filtering out associated data relevant to...
Biconvex asked 28/9, 2018 at 6:20

4

Solved

I'm using rails 5 with turbolinks 5 and trying to get google places autocomplete address form to work using the example from google's website found here I only want to load the javascript and goog...

1

Solved

I have currently spent a few days trying to solve this issue. As it currently stands whenever I log in to my Rails 5 application on production through Chrome I get this error. I am running rails ve...
Linis asked 27/9, 2018 at 4:43

0

Currently I'm trying to attach an :avatar field on a Profile. I get the following error: However, following the docs I added the relationshipt of :avatar to Profile. models/profile.rb class Prof...
Xylograph asked 23/9, 2018 at 18:46

3

Solved

The Order model: class Order < ActiveRecord::Base has_many :sales, dependent: :destroy, inverse_of: :order end has_many Sales: class Sale < ActiveRecord::Base belongs_to :order, inverse...

2

Solved

I am trying to setup my Rails 5 ActionCable for broadcasting updates to my database. So far I got things going but I realized that the documentation on ActionCable is kind of lacking. For my case, ...
Heterologous asked 21/9, 2017 at 7:57

1

Solved

I am working on a form that has a select list: <%= f.select :type, options_for_select(Property.types), {prompt: "Select Type of Property..."}, class: "form-control" %> type is an integer i...
Racketeer asked 15/9, 2018 at 9:57

2

Edit #2 Here is the courses controller class CoursesController < ApplicationController layout proc { user_signed_in? ? "dashboard" : "application" } before_action :set_course, only: [:show,...

3

Solved

I'm upgrading a Rails 5.1 application to 5.2. I've updated all of my gems including Rails and finally ran rails app:update which created new files for my rails app. Specifically there are two fil...
Paradiddle asked 18/6, 2018 at 20:57

3

Edit #1 Here is what I have now <% if course.complete? %> <%= link_to "Completed", course, class: "block text-lg w-full text-center text-white px-4 py-2 bg-green hover:bg-green-dark bor...
Lucia asked 22/8, 2018 at 15:2

2

Solved

I am trying to build a has_many model in the belongs_to model association in rails. The association is correct, but it shows error "must exist". I tried putting the optional: true, but it does not ...
Thales asked 17/8, 2018 at 14:28

2

Solved

I have a button that directs the user to another page: <%= link_to "Jacuzzis", applications_path, class: "dropdown-item"%> At the moment, this will lead the user to my 'applications' page, ...
Hinson asked 17/8, 2018 at 12:21

2

Solved

I'm not sure what i'm missing, but my css doesn't seem to be working along side wicked_pdf. I have an image linked in my file, which works, but the styles are missing. Gemfile gem 'wicked_pdf' ge...
Perspective asked 17/8, 2018 at 6:42

© 2022 - 2024 — McMap. All rights reserved.