def create
review = Review.new(params[:review])
review.user = current_user
+ review.status = "open"
+ review.review_type = "simple"
review_comment = ReviewComment.new(params[:review_comment])
review_comment.user = current_user
review.review_comments << review_comment
<h3>Create a new review</h3>
<% form_for :review, @review do |f| %>
<%= f.hidden_field :rule_failure_id %>
- Review by: <%= @review.user.login -%>
- <br/>
- Review type: <%= f.text_field :review_type %>
- <br/>
- Status: <%= f.text_field :status %>
+ Review made by: <%= @review.user.name -%>
<br/>
Severity: <%= f.text_field :severity %>
<br/>
- External Link: <%= f.text_field :external_link %>
- <br/>
Comment:
<br/>
<%= text_area :review_comment, :review_text, :id => "reviewText", :rows => 10 %>
<% form_for :review_comment, @review_comment do |f| %>
<%= f.hidden_field :review_id %>
- Review by: <%= :user -%>
+ Review by: <%= @review_comment.user.name -%>
<br/>
Comment:
<br/>
<br/>
Severity: <%= h(review.severity) -%>
<br/>
- External Link: <%= h(review.external_link) -%>
- <br/>
<div>
<% unless review.review_comments.blank?
t.column 'review_type', :string, :null => true, :limit => 10
t.column 'status', :string, :null => true, :limit => 10
t.column 'severity', :string, :null => true, :limit => 10
- t.column 'external_link', :string, :null => true, :limit => 200
t.column 'rule_failure_id', :integer, :null => true
t.column 'resource_id', :integer, :null => true
t.column 'resource_line', :integer, :null => true