Today I learned
  • Github
  • Linkedin
  • Nomad Life(Travel Blog)
  • About
Sign in Subscribe

helpers

A collection of 1 post
ruby

Calling View helper methods from Controller / Model in Rails

Recently I was researching a way to use link_to inside my Rails 3 controller, and learned about the method view_context. So if you ever want to access view helper methods from controller / models in rails 3 you have to use view_context method. Example view_context.link_to
17 Jul 2015
Page 1 of 1
Today I learned © 2025
Powered by Ghost