18 April 2014

The Ruby Reflector

Topic

ActionController

  Source Favicon
By santiago.pastorino of WyeWorks Blog - The Team's Voice 6 months ago.
Email

…Serializer talked to the controller . This is now the responsibility of ActionController:: Serializable.

ActiveModel:: Serializer responsibility is to decorate the object we want to serialize but that contract wasn't honored in the previous code . Now there's no direct access to the serialized object and everything is done inside the serializer.

The responsibilities of a few objects were not very clear. For example, Association. Those were used to register …

blog.wyeworks.com Read
  Source Favicon
By santiago.pastorino of WyeWorks Blog - The Team's Voice over 1 year ago.
Email
  Source Favicon
By Giles Bowkett of Giles Bowkett over 1 year ago.
Email

Rails 3 contains a textbook example of the need for a Replace Method With Method Object refactoring .

Consider this question:

I'm wondering what is the difference between these two methods: ActionView::Helpers:: UrlHelper.url for and ActionController::UrlWriter.url_for?

In addition to two versions of the same method, similar but not identical, the documentation for the ActionView::Helpers method link_to states that link_to accepts the same options …

gilesbowkett.blogspot.com Read
  Source Favicon
By José Valim of Plataformatec Blog over 1 year ago.
Email

This is the reason we don't need to eager load something like ActionController::Base . Because Rails already eager loads your models, controllers, etc and if you are actually using Action Controller, you will have a controller inheriting from ActionController::Base which then forces it to be loaded on boot.

Similar reasoning applies to most of Active Model modules. There is no need to eager load ActiveModel::Validations because if an application is using it, it will load a …

blog.plataformatec.com.br Read
  Source Favicon
By Mike Gunderloy of A Fresh Cup over 1 year ago.
Email

Biggest change this week is probably the introduction of ActionController::Live, but there are lots of little advances as well.

449039a8 swaps out ActionDispatch::Head in favor of Rack::Head.

Don't get too used to update_column , which is the 3.2.x replacement for update_attribute . In 87ffc366 it gets replaced by update_columns .

With 6a81ccd6 ActiveRecord:: Base.all returns a Relation instead of an Array. Finally.

99ea1a87 changes the behavior …

afreshcup.com Read
  Source Favicon
By José Valim of Plataformatec Blog almost 2 years ago.
Email

RSpec's example groups. For example, the controller example group is based on ActionController:: TestCase::Behavior . There are also example groups for views, helpers and so forth, but for now we are interested in the request example group, which is as a wrapper for ActionDispatch::Integration::Runner . The Rails' integration runner is built on top of rack-test , a great small gem that adds support to methods like get , post , put and delete and handle …

blog.plataformatec.com.br Read
  Source Favicon
By Nikos Dimitrakopoulos of Nikos D. 2 years ago.
Email

Just stumbled upon them and found them interesting...

Lightrail : Slim Rails stack for JSON services

RocketPants : Also on top of Rails ( ActionController)

Grape

blog.nikosd.com Read
  Source Favicon
On paperplanes 2 years ago.
Email

…its own implementation of a LogSubscriber. Here's an excerpt of the one used by ActionController.

Every public method defined, except for logger , will be attached to an event of the same name. So the three relevant events for this subscriber are start_processing and process_action .

To make the improvement of notifications and log subscribers more visible, here's the code that did the same in Rails 2.3. You decide which you like better. I certainly enjoy the decoupled-ness …

paperplanes.de Read
  Source Favicon
By Giles Bowkett of Giles Bowkett 2 years ago.
Email

…both Giles Bowkett and Matt Aimonetti. Both of them painted building ActionController::Metal applications as some sort of byzantine, impossible task which can only be accomplished by a Rails core member.

The bit in bold is false. My position was and is that ActionController::Metal is awesome and powerful, but irrelevant to what most users need, and miles away from the cutting edge. And I never even mentioned Metal in the post specifically; it just fits into my general position that …

gilesbowkett.blogspot.com Read
  Source Favicon
By Mike Gunderloy of A Fresh Cup 2 years ago.
Email

Week of January 15-21, 2012

Lots of refactorings this week cleaned up the internals of ActionController and ActionView. Fortunately if you've been paying attention to deprecation warnings these should not have an impact on your applications when you upgrade to Rails 4.

In a nice bit of tidying-up, 2c72f2a9 adds app/mailers to the list of things reported on by rake:stats.

5a6ea535 adds the ability to set config.actionview.logger independently of other loggers.

afreshcup.com Read