hanami - Form Help In Hanamirb (Lotusrb) -


does hanami support below code?

<%= form_for :question, routes.question_path. method: 'post' %> <div class="box-body">   <div class="row">     <div class="box-body pad">        <textarea id="content"></textarea>     </div>`enter code here`   </div> </div> <% end %> 

and how can can in template?

though possible, official hanami guide discourages has resort monkey patching in order work various template engines.

you can read more here.

an alternative approach define single form rendering method in view, this:

def form   form_for :question, routes.questions_path, method: 'post'     div(class: 'box-body')       div(class: 'row')         div(class: 'box-body pad')           text_area :content, id: 'content'         end       end     end   end end 

then, somewhere in template, can call render form:

<%= form %> 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -