rails 4中部分布局出错

时间:2016-03-16 23:29:28

标签: ruby ruby-on-rails-4

我有这个观点:

 sql.js

 var sql = require('sql');
 var connection = sql.createConnection({
 host : 'localhost',
 user : 'root',
 password : '',
 database : 'db'
 });

connection.connect(function(err){
if(!err) {
console.log("connected");
}

这部分形式:

<%= form_for(:subject, :url => { :action => 'update', :id => @subject.id}) do |f| %>
<%= render partial: "layouts/form" , locals: {:jex => f}  %>

但是,我有一个错误:

undefined local variable or method `jex'

我做错了什么?

1 个答案:

答案 0 :(得分:0)

<%= render "layouts/form", jex: f %>