search for: convert_to_html

Displaying 3 results from an estimated 3 matches for "convert_to_html".

2006 May 31
0
acts_as_blog
...eed to transform the markup into html before_save :transform_post has_many :comments # we need to keep the posts table in good shape! validates_presence_of :date, :raw_post, :title, :category, :description ## transform the text into valid html def transform_post self.post = Post.convert_to_html(self.raw_post, ''textile'') end ==================================================================== #Here is an example of the comments model. class Comment < ActiveRecord::Base acts_as_blog belongs_to :post before_save :transform_comment ## validation checks v...
2006 May 26
1
access a ActionControllers protected method from plugin?
...sion module Acts module Blog def self.included(base) base.extend(ClassMethods) end def acts_as_blog class_eval do extend TextConversion::Acts::Blog::SingletonMethods end end end module SingletonMethods def convert_to_html(txt, text_filter, restrictions = []) txt = Execute.execute_ruby_code(txt) end return txt end end end end -- Posted via http://www.ruby-forum.com/.
2006 May 26
8
calling render_to_string outside of controller
How can I call render_to_string outside of a controller. I''m stuck on this. I''ve nearly got my plugin finished but I can''t seem to get this to work. The method is in ActionController::Base but it is protected. -- Posted via http://www.ruby-forum.com/.