Form Input renders as raw text in cell
HermannHH opened this issue · 1 comments
HermannHH commented
When rendering a form via cells
& slim
, the form tag is parsed properly as a <form>
tag. All the inputs inside the form, however, are printed out as a string/text in the browser view.
If the same form is rendered as a Rails view, the form is parsed perfectly.
What I would expect to happen:
Render form with an input called body
. Image of form using standard Rails view:
What happens
Renders the input HTML as raw text instead of an input. Image using cell.
My Code:
Gemfile
gem "trailblazer-cells" # V 0.0.3
gem "cells-rails" # V 0.1.3
gem "slim-rails". # V 3.2.0
gem "cells-slim" # V 0.1.1
messages_controller.rb
def new
run Message::Operation::Create::Present
render html: concept(Message::Cell::Form, @form,
context: {}
)
end
application_cell.rb
class ApplicationCell < Trailblazer::Cell
include ::ActionView::Context
include ActionView::Helpers::UrlHelper
include ActionView::Helpers::CaptureHelper
include ::SimpleForm::ActionViewExtensions::FormHelper
end
message/cell/form.rb
class Message::Cell::Form < ApplicationCell
def show
render
end
end
messages/view/form.slim (PS: I have also tried with a single =)
== simple_form_for model, url: messages_path, method: :post do |f|
= f.input :body
= f.submit
samstickland commented
I think you want - simple_form_for
not ==