Fckeditor_textarea

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.

This also worked for me, thank you so much!

Groove

On Nov 26 2008, 5:39 am, Santosh Verma <rails-mailing-l…@andreas-

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/fcf8fbee8cfad3a3df0df50172e448727909ccb9

this worked for me.

Thank you!

Haha…you saved my life.

Thank you!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs