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.

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to