Top "Ruby-on-rails-5" questions

For issues specific to version 5.x.y of Rails.

rails db:migrate vs rake db:migrate

I'm new to rails. I noticed when generating data migration in rails 5, some people use rails db:migrate over rake …

ruby-on-rails ruby-on-rails-5 rake
Rails: difference between ENV.fetch() and ENV[]

What is the difference between these two syntax: ENV.fetch("MY_VAR") ENV['MY_VAR'] I've seen Rails 5 use both …

ruby-on-rails ruby ruby-on-rails-5
Relation passed to #or must be structurally compatible. Incompatible values: [:references]

I have two queries, I need an or between them, i.e. I want results that are returned by either …

sql ruby-on-rails postgresql activerecord ruby-on-rails-5
Rails server doesn't see code changes and reload files

I noticed that my rails server doesn't reload controllers, models and probably any other files after I change them. I …

ruby-on-rails vagrant puma ruby-on-rails-5
Rails4: Can't modify frozen hash

The Order model: class Order < ActiveRecord::Base has_many :sales, dependent: :destroy, inverse_of: :order end has_many Sales: …

ruby-on-rails ruby-on-rails-4 activerecord ruby-on-rails-5
Rails 5. Strong params require not used if one permit key is set

I am using Rails 5 to create a JSON Api. My controller uses strong parameters with one require attribute like this: …

ruby-on-rails ruby strong-parameters rails-api ruby-on-rails-5
verify_authenticity_token has not been defined

Ruby version 2.2.4, Rails version 5.0.0.1. I'm getting stuck at a part of a tutorial where you test login with curl. I …

ruby-on-rails ruby-on-rails-5
How to use params.fetch strong parameters

When using rails g scaffold kittens the strong parameters function, kitten_params is def kitten_params params.fetch(:kitten, {}) end …

ruby-on-rails ruby-on-rails-5
Request origin not allowed: http://localhost:3001 when using Rails5 and ActionCable

Having server issues with an app in Rails 5.0.0.beta2 trying to use ActionCable. Using localhost:3000 works fine, as that is …

ruby-on-rails ruby-on-rails-5 actioncable
Connection Pool for rails 5

I am having this issue with rails 5 rc1. Does anyone have any idea how to configure it in the environment …

ruby-on-rails ruby-on-rails-5