Top "Ruby-on-rails-4" questions

For issues specific to version 4 of Rails.

How to use fonts in Rails 4

I have a Rails 4 application and I am trying to use a custom font. I have followed many tutorials on …

fonts asset-pipeline ruby-on-rails-4
Paperclip::Errors::MissingRequiredValidatorError with Rails 4

I'm getting this error when I try to upload using paperclip with my rails blogging app. Not sure what it …

ruby-on-rails ruby ruby-on-rails-4 paperclip
Rails I18n validation deprecation warning

I just updated to rails 4.0.2 and I'm getting this warning: [deprecated] I18n.enforce_available_locales will default to true …

ruby-on-rails ruby ruby-on-rails-4 deprecated rails-i18n
Safe ActiveRecord like query

I'm trying to write LIKE query. I read that pure string quires aren't safe, however I couldn't find any documentation …

ruby activerecord ruby-on-rails-4
What is the equivalent of the has_many 'conditions' option in Rails 4?

Can someone tell me what is the equivalent way to do the following line in Rails 4? has_many :friends, :through =&…

ruby-on-rails-4
What is the use of secret_key_base in rails 4

I am new to Rails 4, and do not understand the use of secret_key_base under config/secrets.yml in …

ruby-on-rails ruby ruby-on-rails-4 ruby-on-rails-5 ruby-on-rails-6
Generate migration - create join table

I have looked through many SO and google posts for generating migration of join table for has many and belongs …

ruby-on-rails ruby-on-rails-3 ruby-on-rails-4 migration jointable
has_many, belongs_to relation in active record migration rails 4

I have a User model and a Task model. I have not mentioned any relation between them while creating them. …

ruby-on-rails rails-activerecord ruby-on-rails-4 rails-migrations
rails 4: custom error pages for 404, 500 and where is the default 500 error message coming from?

Currently in production im getting this text: 500 Internal Server Error If you are the administrator of this website, then please …

error-handling ruby-on-rails-4
Rails 4: find all records

Now that ActiveRecord::Relation#all is deprecated in Rails 4, how are you supposed to iterate all records? Used to be …

activerecord ruby-on-rails-4