Blog Postings Ruby on Rails
Accessing view helpers in your controller
Posted by Mike Scriber on Friday, February 22, 2008
Today I had an interesting dilemma come about, which was using the text helper truncate and pluralize within a controller.
I’ve come across a solution from Lars Pind, which opens up the module and makes them module methods. Follow the steps below and you’ll be on your way to using text helper methods within your controllers in just a few minutes.
Step One
Create actionpack_ext.rb in your /lib directory. You can name this file anything you would like.
Step Two
Copy below code snippet into actionpack_ext.rb
module ActionView
module Helpers
module TextHelper
module_function :pluralize, :truncate
end
end
end ... read more.
FCKEditor Plugin for Rails
Posted by Nathan Rambarran on Friday, April 04, 2008
I want to give a big shout out to Scott Rutherford who made a Rails plugin for the ever so popular FCKEditor. I had the FCKEditor setup within two minutes and haven't hit a single speed bump in the implementation.
For those of you who don't know what FCKEditor is, it's a completely free WYSIWYG editor that's been around for a very long time and I've chosen to use it over TinyMCE, another popular but not AS free editor as FCKEditor time and time again.
Check out Scott's article and plugin at http://blog.caronsoftware.com/2006/08/07/fckeditor-plugin-for-rails
Search Site
About Nathan
Nathan is a Dim sum (Yum Cha) loving Ruby Hacker and an IT Consultant located in Toronto, Ontario.
