1

I can only use:

<object> data.. </object>, 

not:

Can I change the syntax:

<object data="data:text/html;base64,drgsdrgsdrgsdrgsdrgsdrgsdrg=="></object>

into this style:

<object>data</object> style?

undefined method `attribute_method_matcher' for nil:NilClass

I'm getting this error "undefined method `attribute_method_matcher' for nil:NilClass".

My controller name is Cad Its function is

  def index
     @cadempty = Cad.new
     @caddata = Cad.all

  end

The error is on creating the new object. If I comment Cad.new the code works fine.

Earlier I thought it could be because I have a method named 'new' and I was Using User.new to create a blank object for the form. But its not the error I renamed the method to something else and the error still exists. I have no idea what I'm doing wrong.

4

1 回答 1

2

不。

对象元素的子节点:

  1. 提供替代内容以防无法加载对象数据
  2. 以 HTML 而非 URI 的形式表示

您可以得到的最接近的方法是解码嵌入在 URI 中的 HTML(尽管声称它是text/html,但 URI 似乎没有解析为任何理智的东西),然后使用它而不是根本没有对象。

于 2012-12-26T17:17:22.613 回答