Created
May 27, 2016 20:45
-
-
Save aya-soft/f89f2c1a950467f16f3ccfd0e770af5d to your computer and use it in GitHub Desktop.
1) @spare.number нужно заменить на @comment.spare.number 2) hidden_field убрать СРОЧНО!!! его можно легко подделать
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%h1 Редактировать комментарий об установки детали № #{@spare.number} | |
%h2 Сервисный центр #{@comment.service_station.name} | |
= simple_form_for [:admin, @comment], :html => { id: "comment_form", class: "form-horizontal", role: "form" } do |f| | |
= f.hidden_field :spare_id, value: @spare.id | |
= f.input :time_of_installing_current_part, label: "Ориентировочное время установки (ч.)" | |
= f.input :installing_current_part_price, label: "Стоимость установки (р.)" | |
= f.input :comment, label: "Комментарий", as: :text | |
.form-group | |
.col-sm-offset-3.col-sm-9 | |
= f.submit "Сохранить", class: "btn btn-primary" | |
= link_to "Отмена", :back, class: "btn btn-default" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Сделал