Commit 7f2ca038 authored by Chanelle Lunod's avatar Chanelle Lunod

Initial commit

parent 0841ec20
source 'https://rubygems.org' source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" } git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.3.3' #ruby '2.3.3'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0' gem 'rails', '~> 5.2.0'
......
...@@ -2,9 +2,8 @@ ...@@ -2,9 +2,8 @@
<%= simple_form_for @product do |f| %> <%= simple_form_for @product do |f| %>
<%= f.input :name %> <%= f.input :name %>
<%= f.input :description %> <%= f.input :description, as: :text %>
<%= f.input_button :status, 'ACTIVE' %> <%= f.input :status, as: :radio_buttons, collection: [['ACTIVE'], ['INACTIVE']], label_method: :first %>
<%= f.input_button :status, 'INACTIVE' %> <%= f.button :submit, "Save", class: "btn btn-primary" %>
<%= f.button :submit, "Product", class: "btn btn-primary" %>
<%= link_to "Back", products_path, class: "btn btn-default" %> <%= link_to "Back", products_path, class: "btn btn-default" %>
<% end %> <% end %>
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
<%= simple_form_for @product do |f| %> <%= simple_form_for @product do |f| %>
<%= f.input :name %> <%= f.input :name %>
<%= f.input :description %> <%= f.input :description %>
<%= f.input :status %> <%= f.radio_button :status, 'ACTIVE' %>
<%= f.radio_button :status, 'INACTIVE' %>
<%= f.button :submit, "Create Product", class: "btn btn-primary" %> <%= f.button :submit, "Create Product", class: "btn btn-primary" %>
<%= link_to "Back", products_path, class: "btn btn-default" %> <%= link_to "Back", products_path, class: "btn btn-default" %>
<% end %> <% end %>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment