blog.plataformatec.com.br

This means Basecamp migrated from the first Rails release up to the edge one. So how come people say so frequently how hard is to update their applications from Rails...

...to Rails 2.2? And the answer is simple: plugins...

...led me to the solution: I had to write has_many placeholder.to_sym. When Rails can't find an association, make sure it's defined as symbol Seemingly, that's...

...a bug in Rails...

The ActionMailer in Rails 2 depends on a buggy version of TMail, which sometimes inserts a blank line into the mail header when sending a mail to multiple recipients. This...

...mail through an MTA like Exim, it will fix this for you. Fix for Rails if you don't have an awesome MTA TMail is no longer maintained. The bug...

makandra dev

Have you ever mistaken one Rails environment for another? The attached helper will help you to never do it again. Save the attached file to app/helpers/ and use the widget...

...in your layout like this: %body = rails_env_widget unless Rails.env.production? It'll render a small light gray box in the top left corner of your screen, containing the current...

This will show you how to create a RSS feed that the Feed Validator considers valid. Note that RSS is...

blog.plataformatec.com.br

It is common in Rails 3.0 applications that you want to provide default views for a group of controllers. Let’s say you have a bunch of controllers inside the...

...for Admin::PostsController and “app/views/admin/posts/index.html.*” is not available, it should then render “app/views/admin/defaults/index.html”. Since Rails 3.0, we have a new abstraction called resolvers that holds the logic to find a...

markembling.info

Using uncountable resources is not recommended as it breaks Rails' magic, e.g. when using form_for. You'll always be better off using simple pluralizable resources. Rails automatically creates path...

...will refer to the show action: /sheep/:id. Solution As the linked article states, Rails creates a special _index_path for this scenario. Thus, you can simply call:

...fix this issue. This patch is planned to be included in the next makandra Rails LTS release...

When writing Rails migrations to convert a string column to an integer you'd usually say: change_column :table_name, :column_name, :integer However, PostgreSQL will complain: PG::DatatypeMismatch: ERROR...

There are a few ways to access view helpers from the Rails console. The easiest way is the helper shortcut: helper.translate 'i18n.string' helper.your_helper_method If the desired helper renders...

...a view template, you need this setup: view_paths = Rails::Application::Configuration.new(Rails.root).paths["app/views"] av_helper = ActionView::Base.new(view_paths).extend YourHelperModule av_helper.your_helper_method

...it has always worked: NoMethodError: undefined method `allow_value' for # This is due to Rails 4.1 (specifically, Spring) revealing a weak point of shoulda-matchers -- jonleighton explains why. Solution

weblog.rubyonrails.org

jQuery as new default Javascript library, streaming response support, attr_accessible with roles, prepared statements, easier migrations.

github.com

Leads to awesomeness and unicorns when used in production.

snippets.dzone.com

These two models can be used to access the posts and associated comments of a WordPress database.

railscheck.rubyforge.org

...is (or will be) a best effort semi-static verifier for your Ruby on Rails projects. Delivered as a Ruby gem it provides a shell command task "railscheck" that you...

...can run against your Rails projects to test for a number of typical bugs, potential problems and inconsistencies...

socghop.appspot.com

Finish the remainder of the ActiveModel todo list (observers, callbacks, validations, scoping, and serialization) in addition to associations. Also wire...

engineyard.com

Asynchronous JavaScript and CSS, also known as CSSHttpRequest, is a method of URI-encoding data in 2KB chunks split over...

railsrescuebook.com

How to rescue a project without losing your mind.