From cd73e4810a0e41d57c6e69a9a5ecf9dceb633dee Mon Sep 17 00:00:00 2001 From: ahinz Date: Thu, 11 Dec 2014 15:39:50 +0100 Subject: [PATCH] ` --- app/views/articles/_form.html.erb | 17 ++--------------- app/views/articles/index.json.jbuilder | 2 +- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/app/views/articles/_form.html.erb b/app/views/articles/_form.html.erb index 6714e4b..482418b 100644 --- a/app/views/articles/_form.html.erb +++ b/app/views/articles/_form.html.erb @@ -25,7 +25,7 @@
<%= f.label :content, :class => 'control-label' %>
- <%= f.text_field :content, :class => 'form-control' %> + <%= f.text_area :content, :class => 'form-control' %>
<%= error_span(@article[:content]) %>
@@ -43,20 +43,7 @@ <%= error_span(@article[:active]) %> -
- <%= f.label :created_by, :class => 'control-label' %> -
- <%= f.text_field :created_by, :class => 'form-control' %> -
- <%= error_span(@article[:created_by]) %> -
-
- <%= f.label :updated_by, :class => 'control-label' %> -
- <%= f.text_field :updated_by, :class => 'form-control' %> -
- <%= error_span(@article[:updated_by]) %> -
+ <%= f.submit nil, :class => 'btn btn-primary' %> diff --git a/app/views/articles/index.json.jbuilder b/app/views/articles/index.json.jbuilder index 09eee49..1f7800e 100644 --- a/app/views/articles/index.json.jbuilder +++ b/app/views/articles/index.json.jbuilder @@ -1,4 +1,4 @@ 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) end