actionview - Rails 3.2/4: Is there a way to easily render a template (partial, whatever...) from the console? -


i've been looking easy way render views (or templates). i've seen complicated solutions on internet involve getting rendering engine, passing context, action view instance initialized original view paths, fetched actioncontroller::base, , can pass local variables, of course, if not using instance variables inside templates or i'm not using helper methods, have insert/include hand, , still have problems regarding relative location of partials, not infered outside rails context.. uhf... isn't there main object can call simple #render method from?

if you're working rails console, call:

> app.get '/' > response = app.response > body = response.body 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -