Top "Ruby-on-rails-3" questions

Ruby on Rails is an open-source web development framework written in Ruby.

Best way to create unique token in Rails?

Here's what I'm using. The token doesn't necessarily have to be heard to guess, it's more like a short url …

ruby-on-rails ruby-on-rails-3 random guid
Can you do greater than comparison on a date in a Rails 3 search?

I have this search in Rails 3: Note.where(:user_id => current_user.id, :notetype => p[:note_type], :date =&…

ruby-on-rails activerecord ruby-on-rails-3
How to add 10 days to current time in Rails

I tried doing something like Time.now + 5.days but that doesn't work, even though I vaguely remember seeing, and being …

ruby-on-rails datetime ruby-on-rails-3 activesupport
String "true" and "false" to boolean

I have a Rails application and I'm using jQuery to query my search view in the background. There are fields …

jquery ruby-on-rails ruby ruby-on-rails-3
Rails 3 check if attribute changed

Need to check if a block of attributes has changed before update in Rails 3. street1, street2, city, state, zipcode I …

ruby-on-rails ruby-on-rails-3
How to change navbar collapse threshold using Twitter bootstrap-responsive?

I'm using Twitter Bootstrap 2.0.1 in a Rails 3.1.2 project, implemented with bootstrap-sass. I'm loading both the bootstrap.css and the bootstrap-responsive.…

css ruby-on-rails-3 twitter-bootstrap
How to chain scope queries with OR instead of AND?

I'm using Rails3, ActiveRecord Just wondering how can I chain the scopes with OR statements rather than AND. e.g. …

ruby-on-rails ruby-on-rails-3 activerecord rails-activerecord
Rails: FATAL - Peer authentication failed for user (PG::Error)

I am running my development on Ubuntu 11.10, and RubyMine Here is my development settings for the database.yml: which RubyMine …

ruby-on-rails postgresql ruby-on-rails-3 ruby-on-rails-3.1 ubuntu-11.10
Rails: Why "sudo" command is not recognized?

In my application directory (on Windows) I run: sudo pdfkit --install-wkhtmltopdf as explained here, but I got this error: 'sudo' …

ruby-on-rails ruby-on-rails-3 sudo wkhtmltopdf pdfkit
belongs_to through associations

Given the following associations, I need to reference the Question that a Choice is attached through from the Choice model. …

ruby-on-rails ruby-on-rails-3 activerecord