Today I learned
  • Home
  • Github
  • Linkedin
  • Nomad Life(Travel Blog)
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
Jul 17, 2015
Page 1 of 1
Today I learned © 2023
Powered by Ghost