Arw*_*wed 18 ruby-on-rails templating
我正在尝试delayed_job
通过xml更新远程数据库
在我的lib文件夹,我把一类是应该做的一个文件render_to_text
有template.xml.builder
,但我得到:
undefined method `render_to_string' for #<SyncJob:0x7faf4e6c0480>...
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
小智 55
ac = ActionController::Base.new()
ac.render_to_string(:partial => '/path/to/your/template', :locals => {:varable => somevarable})
Run Code Online (Sandbox Code Playgroud)
小智 5
我在使用未定义的辅助方法时遇到问题,然后使用 ApplicationController
ApplicationController.new.render_to_string
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
14243 次 |
最近记录: |