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.


On Wed, Oct 30, 2013 at 6:31 PM, Robert Walker <[email protected]> wrote:

> 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
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/04c6c7e56043a236852af1688f4d0a63%40ruby-forum.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAMJk0n4VR7_YcP64YA%2B00i1w7AXQqjQYUSaCGVm2Owd-wvbpEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to