search for: acts_as_blog

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

2006 May 31
0
acts_as_blog
...fly each time the post is accessed. This creates a pretty good speedup for some applications. You can pass in any of the available filters for each of the markup styles. =============================================================== ## example of posts model class Post < ActiveRecord::Base acts_as_blog ## before we save, we need 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...
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/.
2006 May 26
1
access a ActionControllers protected method from plugin?
...)\<\/ruby\>/) do |match| match = self.render(:inline => $1, :type => ''rhtml'') logger.error(match) end str end end module TextConversion 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 t...