2009-07-17 2 views
0

다음은 모델입니다. .레일에있는 acts_as_textile 플러그인으로 링크가 엉망이됩니까?

[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>" 

모든 섬유 코드가 링크를 제외하고 작동 왜 엉망이됩니다 : 이미 2.3.2 콘솔에서 이제

class Post < ActiveRecord::Base 
    acts_as_textiled :content 
end 

이 Redcloth ((4.2.2를 설치) 및 레일에 플러그인을 acts_as_textiled했습니다

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

링크가 무슨 잘못 그것을 사용하여 링크 자체에 ?? 함께 저장됩니다 ?? 광고로 링크가 포맷되지 않습니다?

답변

0

이전 버전의 acts_as_textiled를 사용할 때도 동일한 문제가있었습니다. 내 버전을 업데이트 한 후 http://github.com/defunkt/acts_as_textiled/

에서 사용할 수있는 자식 저장소에서 최신 버전의 복제 확인, 링크는 일을 시작 그들이

을해야한다 등
관련 문제