Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

content of the summernote is not posted to the controller #31

Closed
ghost opened this issue Jul 21, 2015 · 6 comments
Closed

content of the summernote is not posted to the controller #31

ghost opened this issue Jul 21, 2015 · 6 comments

Comments

@ghost
Copy link

ghost commented Jul 21, 2015

Did you test if the controller can get the user input of the summernote?

On my end, my application controller cannot get the value of the summernote.

Here is my view.html.erb

                <%= simple_form_for :question, url: { action: 'submit' } do |f| %>
                    <%= f.hidden_field :course_id, value: @current_course %>
                    <div class="form-group">
                      <%= f.label :question_title, "Question Title" %>
                      <%= f.text_field :question_title, autofocus: true, class: "form-control placeholder-no-fix", placeholder: "What's you questions? Be specific" %>
                    </div>
                    <div class="form-group">
                      <label for="description">Description</label>
                      <%= f.input :question_content, input_html: { class: 'summernote' } %>
                    </div>
                    <div class="text-right">
                      <%= f.submit "Save", class: "btn btn-primary" %>
                    </div>
                <% end %>

but the value of :question_content is not be post back.

ActionController::Parameters (3 elements)
'course_id' = "12"
'question_title' = "sdfsdfs"

'question_content' = ""

The version of summernote i am using is v0.6.10.0.

@unsouled
Copy link

@Jusliang

did you try this?

<%= f.input :question_content, as: 'summernote'  %>

@hackerwins
Copy link
Owner

@unsouled 👍

@ghost
Copy link
Author

ghost commented Jul 22, 2015

@unsouled yes, I tried, same issue

@seapy
Copy link
Contributor

seapy commented Jul 24, 2015

@Jusliang show your html source, not simple form source

@unsouled
Copy link

@Jusliang
If you use rails4 ( or strong_parameter gem ), check that 'question_content' parameter was permitted by your controller.

@riseshia
Copy link
Contributor

riseshia commented Nov 2, 2016

is there any progress? I will close this if not.

@riseshia riseshia closed this as completed May 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants