19 Oct '13, 3pm

Rails route helpers are brittle via @pivotallabs

TL;DR: Use the resource itself instead of a route helper when representing urls in your Rails application. Route helpers hard code knowledge of model names, making refactoring to polymorphism harder. This is a story about a widely used, and potentially very brittle Rails feature. We have a large Rails application. Our large Rails application has a lot of views. Those views have lots of links and forms. Many of our controller actions have urls in them (for redirection, typically). When we represented a URL in the app, we often used a rails route helper. For example, imagine we had the following routes: namespace :admin do scope module: “admin” do resources :widgets do scope module: “widgets” do resources :gizmos resources :things resources :gadgets end end end end Our app has an admin section. In the admin section, you can manage widgets. Also, widgets have gizmos. When we ...

Full article: http://pivotallabs.com/rails-route-helpers-are-brittle/

Tweets

"Rails Tips|Nokogiri::HTML::Builder" good read

oiax.jp 23 Oct '13, 2am

module ApplicationHelper include HtmlBuilder def table_of_users(users) markup do |m| m.table(id: 'users') do m.tr do m.th ...

Rails Tips|Decorator/Presenter @feedlyさんから

oiax.jp 20 Oct '13, 4pm

class UserPresenter attr_accessor :user, :view_context delegate :family_name, :given_name, to: :user def initialize(user, ...

@creativereason see this category: @excid3 @rbates

railscasts.com 18 Oct '13, 6pm

AngularJS is an awesome framework for easily creating rich, client-side applications. Its powerful bindings allow you to d...

Rails 3.2.15

rubyflow.ru 18 Oct '13, 8am

Вышел новый Rails 3.2.15. Это баг-фикс релиз, поэтому всем настоятельно рекомендуется обновиться. Исправлена уязвимость в ...

Route 40 - Finglas West

dublinbus.ie 21 Oct '13, 7pm

EPiServer CMS Log in to EPiServer CMS 6 Name ­ Password ­ Enable automatic logon to this website If you log in, cookies wi...

@jcoglan @pixeltrix Initialisers in rails also ...

guides.rubyonrails.org 23 Oct '13, 7pm

configures Rails itself to serve static assets. Defaults to true, but in the production environment is turned off as the s...

“#348 The Rails API Gem - RailsCasts”

railscasts.com 18 Oct '13, 12pm

$ rake middleware use ActionDispatch::Static use Rack::Lock use #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0...