Sha256: cdc94b1cd6310061712db95867ce58cd6a7f4637e4108fd247b9dbdfb678db4b

Contents?: true

Size: 350 Bytes

Versions: 3

Compression:

Stored size: 350 Bytes

Contents

<% @answer ||= @question.answers.build  %>

<%= simple_form_for [@question, @answer], validate: true do |f| %>
  <%= f.hidden_field :user_id, value: current_user.id %>
  <%= f.hidden_field :question_id, value: @question.id %>
  <%= f.input :text, label: 'Answer this question' %>
  <%= f.submit @answer.new_record? ? 'Answer' : 'Update' %>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rostra-0.0.3 app/views/rostra/answers/_form.html.erb
rostra-0.0.2 app/views/rostra/answers/_form.html.erb
rostra-0.0.1 app/views/rostra/answers/_form.html.erb