Ruby on rails 升级到Rails 3.1后,html_escape似乎被破坏了

Ruby on rails 升级到Rails 3.1后,html_escape似乎被破坏了,ruby-on-rails,activesupport,html-escape,Ruby On Rails,Activesupport,Html Escape,我有一个使用所见即所得编辑器“所见即所得引擎”的项目,该编辑器由来自80beans的荷兰家伙编写。它过去在Rails 3.0.9版上运行良好,但升级到3.1.0后,wysihat引擎无法从ERB::Util(ActiveSupport 3.1.0)中找到“html_escape”,这给了我以下错误消息: undefined method `html_escape' for #<ActionView::Helpers::InstanceTag:my-wysihat-editor- insta

我有一个使用所见即所得编辑器“所见即所得引擎”的项目,该编辑器由来自80beans的荷兰家伙编写。它过去在Rails 3.0.9版上运行良好,但升级到3.1.0后,wysihat引擎无法从ERB::Util(ActiveSupport 3.1.0)中找到“html_escape”,这给了我以下错误消息:

undefined method `html_escape' for #<ActionView::Helpers::InstanceTag:my-wysihat-editor- instance>
未定义的方法“html\u escape”#
我已经通过在“wysihat engine.rb”中定义“html_escape”来修复了它(事实上,Verrry lamely),但我确信,不这样做是有原因的:)

我的问题是: 1.这是新版本Rails的一个bug吗? 2.Rails 3.1项目的所见即所得编辑器有更好的选择吗


先谢谢你

所见即所得引擎似乎与Rails 3不兼容

我曾尝试将其安装在新的Rails 3.1应用程序中,但生成器在尝试生成数据库迁移时失败:

$rails生成所见即所得

~/.rvm/gems/ruby-1.9.2-p290@rails31/gems/railties-3.1.0/lib/rails/generators/migration.rb:30:in `next_migration_number': NotImplementedError (NotImplementedError)
    from ~/.rvm/gems/ruby-1.9.2-p290@rails31/gems/railties-3.1.0/lib/rails/generators/migration.rb:49:in `migration_template'
    from ~/.rvm/gems/ruby-1.9.2-p290@rails31/gems/wysihat-engine-0.1.13/lib/generators/wysihat_generator.rb:60:in `install_wysihat'
我很惊讶你竟然能说出你发布的
html\u escape
错误。修复此问题需要对源代码进行一些修改。你可以找一些信息。

是的,这不容易;)此错误源于wysihat-generator.rb中缺少的一个“self”,在声明受保护的“下一个\u迁移\u编号(dirname)”时,应添加如下内容:def self.下一个\u迁移\u编号。。。。。。。。。。