想通过 ajax 替换掉
里面得模板 load.html.erb: <%= link_to_remote t1.name, :url => attribute_path, :type_name1 => t1.name %> <%= render :partial => 'load', :collection => @default.attrs %>controller 对应的 js.erb: $(“#attributes1”).html(“<%= escape_javascript render(:partial => 'load', :collection => @define1.attrs ) %>”);
controller: def attribute @define1 = ModelName.where(:name => params[:type]).first
respond_to do |format| format.html # index.html.erb format.js end end
不生效吖...哪里出现问题了么