Top "Ruby-on-rails-4" questions

For issues specific to version 4 of Rails.

Rails 4: How to use includes() with where() to retrieve associated objects

I can't figure out how to user the .where() method to retrieve associated model data. In this example, Projects belongs_…

ruby-on-rails ruby associations ruby-on-rails-4
Rails 4 Unpermitted Parameters for Array

I have an array field in my model and I'm attempting to update it. My strong parameter method is below …

ruby-on-rails ruby ruby-on-rails-4 strong-parameters
Postgres JSON data type Rails query

I am using Postgres' json data type but want to do a query/ordering with data that is nested within …

json postgresql ruby-on-rails-4 rails-postgresql psql
Best way to go about sanitizing user input in rails

I've read a lot about this and know there are many related questions on here, but I couldn't find a …

ruby-on-rails-4 sanitization
Bootstrap 3+Rails 4 - Certain Glyphicons not working

I am trying to use bootstrap 3 in my rails 4 app. Followed this tutorial to set up bootstrap 3 using bootstrap saas …

ruby-on-rails-4 twitter-bootstrap-3 twitter-bootstrap-rails
How to uninstall rvm, ruby, rails and gems. I'm getting errors on Mavericks

I'm new on Ruby on Rails and I have some problems with configuration. I don't know what to do. I …

ruby-on-rails-4 rubygems rvm osx-mavericks ruby-2.1
Rails 4 find or create by method doesn't work

I have a one to many association between jobs and companies and it works fine. In the job form view …

ruby-on-rails ruby-on-rails-4 associations
strong parameters permit all attributes for nested attributes

Is there a way in strong parameters to permit all attributes of a nested_attributes model? Here is a sample …

ruby-on-rails ruby ruby-on-rails-3.2 ruby-on-rails-4 strong-parameters
How to integrate a Wrap Bootstrap theme into an Rails application?

I have bought a twitter bootstrap theme from wrapbootstrap. I already have a functional rails application. Now, I want to …

ruby-on-rails twitter-bootstrap ruby-on-rails-3 ruby-on-rails-4 twitter-bootstrap-rails
Rails - Validation :if one condition is true

On Rails 5. I have an Order model with a description attribute. I only want to validate it's presence if one …

ruby-on-rails validation ruby-on-rails-4 ruby-on-rails-5