Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

PIVOTAL LABS
Better Nate the lever

Interestings

ActionController::Base#view_context

Easily access view helpers from your controller, without including modules. Use view_context.some_url_helper for example.

Using controller in presenters

Sometimes you need to use the controller / view_context to access methods you could not in the presenter.

When it's the case, don't put them as a parameter of the method that need them.

This is not a value object (remember Domain Driven Design? :), this is a dependency you should inject when creating your presenter.

Comments
Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *