Forum: Ruby on Rails fckeditor_textarea

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
85217523ffcf754426103302b52ab34a?d=identicon&s=25 Subhadip Chakraborty (subhadip)
on 2008-11-26 10:30
  hi, i am currently using rails version 2.2.2.
  and using fckeditor_textarea.
  here is the code:

  <%= fckeditor_textarea(:emailcontent,:body, {:toolbarSet => 'Basic',
:width => '100%', :height => '100%'}) %>
  where emailcontent is the model(object) name,
        and  body is method.
  but it's not working,however same code is working in any version below
2.2.2.
   The error is undefined method 'relative_url_root'.
   Any reason?
                                 Thanks.
8151b522c55e1c160e89f3ac08d5a173?d=identicon&s=25 Santosh Verma (vermask_7)
on 2008-11-26 11:39
Subhadip Chakraborty wrote:
>
>   hi, i am currently using rails version 2.2.2.
>   and using fckeditor_textarea.
>   here is the code:
>
>   <%= fckeditor_textarea(:emailcontent,:body, {:toolbarSet => 'Basic',
> :width => '100%', :height => '100%'}) %>
>   where emailcontent is the model(object) name,
>         and  body is method.
>   but it's not working,however same code is working in any version below
> 2.2.2.
>    The error is undefined method 'relative_url_root'.
>    Any reason?
>                                  Thanks.

There is been a Fix for Rails 2.2

in the file app/controllers/fckeditor_controller.rb
look for
uploaded = request.relative_url_root.to_s+"#{UPLOADED}/#{params[:Type]}"

replace it with this
uploaded =
ActionController::Base.relative_url_root.to_s+"#{UPLOADED}/#{params[:Type]}"

similarly in the file lib/fckeditor.rb
replace
js_path = "#{request.relative_url_root}/javascripts"
with
js_path = "#{ActionController::Base.relative_url_root}/javascripts"

reference:
http://github.com/salicio/fckeditor/commit/fcf8fbe...

this worked for me.
58d6a4ff6f074c3f357ba291342e312e?d=identicon&s=25 groovetrain (Guest)
on 2009-02-18 06:43
(Received via mailing list)
This also worked for me, thank you so much!

Groove

On Nov 26 2008, 5:39 am, Santosh Verma <rails-mailing-l...@andreas-
91a22c9c5e0dd8acec426f3ff9187946?d=identicon&s=25 William Notowidagdo (williamn)
on 2009-04-02 11:22
Haha..you saved my life.

Thank you!
296cb8080df48b15ced0e8639bf246fd?d=identicon&s=25 kosh (Guest)
on 2009-04-09 08:58
(Received via mailing list)
Thank you!
This topic is locked and can not be replied to.