Только ссылка перепуталась с плагином actions_as_textile в рельсах?

Ниже приводится модель. Я уже установил Redcloth ((4.2.2) и плагин actions_as_textiled на Rails 2.3.2

class Post < ActiveRecord::Base
  acts_as_textiled :content
end

Теперь из консоли:

[Staging]>> post = Post.new(:title => 'the post title', :content => 'the link is "linked":http://www.cc.com', :user_id => 1)
=> #<Post id: nil, title: "the post title", content: "the link is \"linked\":http://www.cc.com", user_id: 1, comments_count: 0, published_at: nil, created_at: nil, updated_at: nil>
[Staging]>> post.content
=> "<p>the link is &#8220;linked&#8221;:<a href=\"http://www.cc.com\">http://www.cc.com</a></p>"
[Staging]>> post.save
=> true
[Staging]>> post.content
=> "<p>the link is &#8220;linked&#8221;:<a href=\"http://www.cc.com\">http://www.cc.com</a></p>"
[Staging]>> post.content = '_simple_'
=> "_simple_"
[Staging]>> post.save
=> true
[Staging]>> post.content
=> "<p><em>simple</em></p>"
[Staging]>> post.content = "This is *cool*"
=> "This is *cool*"
[Staging]>> post.content
=> "<p>This is <strong>cool</strong></p>"
[Staging]>> post.textiled = false
=> false
[Staging]>> post.content = "This is *cool*"
=> "This is *cool*"
[Staging]>> post.content
=> "This is *cool*"
[Staging]>> post.textiled = true
=> true
[Staging]>> post.content
=> "<p>This is <strong>cool</strong></p>"

Все коды текстиля работают, за исключением того, что ссылка перепуталась. Почему эта ссылка не форматируется как рекламируется ??

=> "<p>the link is &#8220;linked&#8221;:<a href=\"http://www.cc.com\">http://www.cc.com</a></p>"

Ссылка сохраняется вместе с самой ссылкой ?? Что с этим не так?


person Autodidact    schedule 17.07.2009    source источник


Ответы (1)


У меня была такая же проблема при использовании более старой версии act_as_textiled. Убедитесь, что вы клонируете самую последнюю версию из репозитория git, доступного по адресу http://github.com/defunkt/acts_as_textiled/

После того, как я обновил свою версию, ссылки начали работать как надо

person Community    schedule 15.11.2009