Displaying 2 results from an estimated 2 matches for "execute_ruby_cod".
Did you mean:
execute_ruby_code
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?
...ere''s the relevent code
# ActsAsBlog - used to convert redcloth,markdown,smarty to html. also
evals <ruby> code and escpates html if needed
require ''active_record''
require ''action_controller''
class Execute < ActionController::Base
def self.execute_ruby_code( str )
logger.error(''test'')
str = str.gsub(/\<ruby\>(.*?)\<\/ruby\>/) do |match|
match = self.render(:inline => $1, :type => ''rhtml'')
logger.error(match)
end
str
end
end
module TextConversion
module Acts
module B...