Top "Ruby-on-rails-3" questions

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

rails error, couldn't parse YAML

After updating the gems I've got this: /home/megas/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/psych.rb:148:in `parse': couldn't …

ruby-on-rails-3 yaml redcloth
Submit form in rails 3 in an ajax way (with jQuery)

I am a beginner in rails and jQuery. I have two separate forms in one page and I want to …

jquery ajax ruby-on-rails-3
No route matches [GET] /assets

I have a Rails app that I'm trying to test in the production environment. I ran RAILS_ENV=production rake …

ruby-on-rails ruby-on-rails-3 asset-pipeline
ActiveRecord: List columns in table from console

I know that you can ask ActiveRecord to list tables in console using: ActiveRecord::Base.connection.tables Is there a …

sql ruby-on-rails ruby-on-rails-3 activerecord
Rails hidden field undefined method 'merge' error

I wanna do something like this in rails Here is what I have so far in rails: <%= form_for @…

ruby-on-rails ruby ruby-on-rails-3 forms hidden-field
Use Rails’ form_for but set custom classes, attributes on <form> element?

form_for seems to ignore any 'extra' attributes like a data-foo attribute or class passed as options in its second …

ruby-on-rails ruby-on-rails-3
How to define action with simple form for?

I am trying to define the action "savenew" in admin/photographers controller. I have tried this: <%= simple_form_for(:…

ruby-on-rails ruby ruby-on-rails-3 simple-form
Build vs new in Rails 3

In the Rails 3 docs, the build method for associations is described as being the same as the new method, but …

ruby-on-rails ruby-on-rails-3 associations
How can I reload the current page in Ruby on Rails?

I currently have a login popup in my header bar which is on every page in my website. I want …

ruby-on-rails ruby ruby-on-rails-3 url-routing
Equivalent of .try() for a hash to avoid "undefined method" errors on nil?

In Rails we can do the following in case a value doesn't exist to avoid an error: @myvar = @comment.try(:…

ruby-on-rails ruby ruby-on-rails-3 hash