Use of FCKEDITOR as normal text area

Hi all

I am trying to use Fckeditor as text area to send mails.here is my code
<% remote_form_for :send_sms,
:before => “Element.show(‘loader’)”,
:success => “Element.hide(‘loader’)” do |sms| %>

<%= fckeditor_textarea :send_sms, :message,:lang => I18n.locale,:langdir => (rtl? ? 'rtl' : 'ltr') %>
<%= submit_tag "#{t('send_sms')}",:class=>'submit_button' %>

<% end %>

But here as the form name is send_sms I used the same name for fckeditor I am unable to send params to my controller.I got the error like

uninitialized constant SendSms.

Can someone help me what is going wrong.

Thanks in advance

keerthi priya wrote in post #1126074:

Hi all

I am trying to use Fckeditor as text area to send mails.here is my code
<% remote_form_for :send_sms,
        :before => "Element.show('loader')",
        :success => "Element.hide('loader')" do |sms| %>
<div id="news_content_text_field_bg">
<%= fckeditor_textarea :send_sms, :message,:lang => I18n.locale,:langdir
=>
(rtl? ? 'rtl' : 'ltr') %></div>
<%= submit_tag "#{t('send_sms')}",:class=>'submit_button' %>

<% end %>

But here as the form name is send_sms I used the same name for fckeditor

In your code :send_sms is not the form name. It is the name of the model
that remote_form_for expect to interact with.

I
am unable to send params to my controller.I got the error like

uninitialized constant SendSms.

You getting this error because there is no model object class named
SendSms.

Can someone help me what is going wrong.

The Rails documentation can help you. I have linked to the Rails 4
documentation describing form_for. Rails 4 removed remote_form_for and
instead added the remote functionality to form_for as you can see later
in the docs:

http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-form_for

Thanks Robert Walker for response. Well send_sms is the form name only but fckeditor is expecting only models. It is not considering any of the name like

There is a model like student fckeditor works fine with below line

<%= fckeditor_textarea :student, :message,:lang => I18n.locale,:langdir => (rtl? ? ‘rtl’ : ‘ltr’) %>

as there is student model and there is no send_sms model I have issue in view but in spite of give the model name to fckeditor in controller which what that value or the text from fckeditor in this way params[:student][:message] I do not get any value in controller. This is what I am facing it.

There is another text box
<%= text_field :send_sms,:subject,:placeholder => ‘Subject’%>

and when I access params[:send_sms][:subject] I get my params here but not with fckeditor as it expects model name first in place of send_sms but after giving the any model name I can not access my params.

I have solved my issue of params I have give model name which it was expecting it. I can get the params but when I mail was sent from fckeditor I am getting the text with html tags in my mail what to do?

Kindly help me