This commit is contained in:
parent
967c4d3520
commit
cd73e4810a
|
|
@ -25,7 +25,7 @@
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<%= f.label :content, :class => 'control-label' %>
|
<%= f.label :content, :class => 'control-label' %>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= f.text_field :content, :class => 'form-control' %>
|
<%= f.text_area :content, :class => 'form-control' %>
|
||||||
</div>
|
</div>
|
||||||
<%= error_span(@article[:content]) %>
|
<%= error_span(@article[:content]) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -43,20 +43,7 @@
|
||||||
</div>
|
</div>
|
||||||
<%= error_span(@article[:active]) %>
|
<%= error_span(@article[:active]) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
|
||||||
<%= f.label :created_by, :class => 'control-label' %>
|
|
||||||
<div class="controls">
|
|
||||||
<%= f.text_field :created_by, :class => 'form-control' %>
|
|
||||||
</div>
|
|
||||||
<%= error_span(@article[:created_by]) %>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<%= f.label :updated_by, :class => 'control-label' %>
|
|
||||||
<div class="controls">
|
|
||||||
<%= f.text_field :updated_by, :class => 'form-control' %>
|
|
||||||
</div>
|
|
||||||
<%= error_span(@article[:updated_by]) %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<%= f.submit nil, :class => 'btn btn-primary' %>
|
<%= f.submit nil, :class => 'btn btn-primary' %>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
json.array!(@articles) do |article|
|
json.array!(@articles) do |article|
|
||||||
json.extract! article, :id, :title, :content, :rate, :active, :created_by, :updated_by
|
json.extract! article, :id, :title, :content, :rate, :active, :created
|
||||||
json.url article_url(article, format: :json)
|
json.url article_url(article, format: :json)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue