From 94a5654371812905c154f29cef393d42f13c5eaa Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Tue, 18 Feb 2014 18:16:28 -0500 Subject: Added the generate shell command. Please do not commit the generated files. --- app/views/matches/_form.html.erb | 17 +++++++++++++++++ app/views/matches/edit.html.erb | 6 ++++++ app/views/matches/index.html.erb | 25 +++++++++++++++++++++++++ app/views/matches/index.json.jbuilder | 4 ++++ app/views/matches/new.html.erb | 5 +++++ app/views/matches/show.html.erb | 4 ++++ app/views/matches/show.json.jbuilder | 1 + 7 files changed, 62 insertions(+) create mode 100644 app/views/matches/_form.html.erb create mode 100644 app/views/matches/edit.html.erb create mode 100644 app/views/matches/index.html.erb create mode 100644 app/views/matches/index.json.jbuilder create mode 100644 app/views/matches/new.html.erb create mode 100644 app/views/matches/show.html.erb create mode 100644 app/views/matches/show.json.jbuilder (limited to 'app/views/matches') diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb new file mode 100644 index 0000000..c772c7f --- /dev/null +++ b/app/views/matches/_form.html.erb @@ -0,0 +1,17 @@ +<%= form_for(@match) do |f| %> + <% if @match.errors.any? %> +
+

<%= pluralize(@match.errors.count, "error") %> prohibited this match from being saved:

+ + +
+ <% end %> + +
+ <%= f.submit %> +
+<% end %> diff --git a/app/views/matches/edit.html.erb b/app/views/matches/edit.html.erb new file mode 100644 index 0000000..38b7d70 --- /dev/null +++ b/app/views/matches/edit.html.erb @@ -0,0 +1,6 @@ +

Editing match

+ +<%= render 'form' %> + +<%= link_to 'Show', @match %> | +<%= link_to 'Back', matches_path %> diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb new file mode 100644 index 0000000..22ae41e --- /dev/null +++ b/app/views/matches/index.html.erb @@ -0,0 +1,25 @@ +

Listing matches

+ + + + + + + + + + + + <% @matches.each do |match| %> + + + + + + <% end %> + +
<%= link_to 'Show', match %><%= link_to 'Edit', edit_match_path(match) %><%= link_to 'Destroy', match, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Match', new_match_path %> diff --git a/app/views/matches/index.json.jbuilder b/app/views/matches/index.json.jbuilder new file mode 100644 index 0000000..08daa52 --- /dev/null +++ b/app/views/matches/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@matches) do |match| + json.extract! match, :id + json.url match_url(match, format: :json) +end diff --git a/app/views/matches/new.html.erb b/app/views/matches/new.html.erb new file mode 100644 index 0000000..bd4c78c --- /dev/null +++ b/app/views/matches/new.html.erb @@ -0,0 +1,5 @@ +

New match

+ +<%= render 'form' %> + +<%= link_to 'Back', matches_path %> diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb new file mode 100644 index 0000000..453985b --- /dev/null +++ b/app/views/matches/show.html.erb @@ -0,0 +1,4 @@ +

<%= notice %>

+ +<%= link_to 'Edit', edit_match_path(@match) %> | +<%= link_to 'Back', matches_path %> diff --git a/app/views/matches/show.json.jbuilder b/app/views/matches/show.json.jbuilder new file mode 100644 index 0000000..7190e4c --- /dev/null +++ b/app/views/matches/show.json.jbuilder @@ -0,0 +1 @@ +json.extract! @match, :id, :created_at, :updated_at -- cgit v1.2.3-2-g168b From 96b97d691f6889004c38bef15411bc27e448fda1 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Tue, 18 Feb 2014 20:42:51 -0500 Subject: Changes to generate.sh --- app/views/matches/_form.html.erb | 4 ++++ app/views/matches/index.html.erb | 2 ++ app/views/matches/index.json.jbuilder | 2 +- app/views/matches/show.html.erb | 5 +++++ app/views/matches/show.json.jbuilder | 2 +- 5 files changed, 13 insertions(+), 2 deletions(-) (limited to 'app/views/matches') diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb index c772c7f..7d0a371 100644 --- a/app/views/matches/_form.html.erb +++ b/app/views/matches/_form.html.erb @@ -11,6 +11,10 @@ <% end %> +
+ <%= f.label :tournament %>
+ <%= f.text_field :tournament %> +
<%= f.submit %>
diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index 22ae41e..d8122ac 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -3,6 +3,7 @@ + @@ -12,6 +13,7 @@ <% @matches.each do |match| %> + diff --git a/app/views/matches/index.json.jbuilder b/app/views/matches/index.json.jbuilder index 08daa52..0839c83 100644 --- a/app/views/matches/index.json.jbuilder +++ b/app/views/matches/index.json.jbuilder @@ -1,4 +1,4 @@ json.array!(@matches) do |match| - json.extract! match, :id + json.extract! match, :id, :tournament json.url match_url(match, format: :json) end diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb index 453985b..7bab721 100644 --- a/app/views/matches/show.html.erb +++ b/app/views/matches/show.html.erb @@ -1,4 +1,9 @@

<%= notice %>

+

+ Tournament: + <%= @match.tournament %> +

+ <%= link_to 'Edit', edit_match_path(@match) %> | <%= link_to 'Back', matches_path %> diff --git a/app/views/matches/show.json.jbuilder b/app/views/matches/show.json.jbuilder index 7190e4c..a381f65 100644 --- a/app/views/matches/show.json.jbuilder +++ b/app/views/matches/show.json.jbuilder @@ -1 +1 @@ -json.extract! @match, :id, :created_at, :updated_at +json.extract! @match, :id, :tournament, :created_at, :updated_at -- cgit v1.2.3-2-g168b From cd1fabe40ca4d290df33a2590f3a1f2072103972 Mon Sep 17 00:00:00 2001 From: DavisLWebb Date: Thu, 20 Feb 2014 17:13:51 -0500 Subject: fix datatype names in generate.sh --- app/views/matches/_form.html.erb | 4 ++-- app/views/matches/index.json.jbuilder | 2 +- app/views/matches/show.json.jbuilder | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views/matches') diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb index 7d0a371..34494c3 100644 --- a/app/views/matches/_form.html.erb +++ b/app/views/matches/_form.html.erb @@ -12,8 +12,8 @@ <% end %>
- <%= f.label :tournament %>
- <%= f.text_field :tournament %> + <%= f.label :tournament_id %>
+ <%= f.text_field :tournament_id %>
<%= f.submit %> diff --git a/app/views/matches/index.json.jbuilder b/app/views/matches/index.json.jbuilder index 0839c83..c8ada7a 100644 --- a/app/views/matches/index.json.jbuilder +++ b/app/views/matches/index.json.jbuilder @@ -1,4 +1,4 @@ json.array!(@matches) do |match| - json.extract! match, :id, :tournament + json.extract! match, :id, :tournament_id json.url match_url(match, format: :json) end diff --git a/app/views/matches/show.json.jbuilder b/app/views/matches/show.json.jbuilder index a381f65..2e45395 100644 --- a/app/views/matches/show.json.jbuilder +++ b/app/views/matches/show.json.jbuilder @@ -1 +1 @@ -json.extract! @match, :id, :tournament, :created_at, :updated_at +json.extract! @match, :id, :tournament_id, :created_at, :updated_at -- cgit v1.2.3-2-g168b From eaf3d3cddf418c560c9619f722ea1dbc5d6cc61a Mon Sep 17 00:00:00 2001 From: DavisLWebb Date: Sun, 2 Mar 2014 15:59:50 -0500 Subject: currently adding Session controller and view --- app/views/matches/_form.html.erb | 21 +++++++++++++++++++++ app/views/matches/edit.html.erb | 6 ++++++ app/views/matches/index.html.erb | 27 +++++++++++++++++++++++++++ app/views/matches/index.json.jbuilder | 4 ++++ app/views/matches/new.html.erb | 5 +++++ app/views/matches/show.html.erb | 9 +++++++++ app/views/matches/show.json.jbuilder | 1 + 7 files changed, 73 insertions(+) create mode 100644 app/views/matches/_form.html.erb create mode 100644 app/views/matches/edit.html.erb create mode 100644 app/views/matches/index.html.erb create mode 100644 app/views/matches/index.json.jbuilder create mode 100644 app/views/matches/new.html.erb create mode 100644 app/views/matches/show.html.erb create mode 100644 app/views/matches/show.json.jbuilder (limited to 'app/views/matches') diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb new file mode 100644 index 0000000..34494c3 --- /dev/null +++ b/app/views/matches/_form.html.erb @@ -0,0 +1,21 @@ +<%= form_for(@match) do |f| %> + <% if @match.errors.any? %> +
+

<%= pluralize(@match.errors.count, "error") %> prohibited this match from being saved:

+ +
    + <% @match.errors.full_messages.each do |msg| %> +
  • <%= msg %>
  • + <% end %> +
+
+ <% end %> + +
+ <%= f.label :tournament_id %>
+ <%= f.text_field :tournament_id %> +
+
+ <%= f.submit %> +
+<% end %> diff --git a/app/views/matches/edit.html.erb b/app/views/matches/edit.html.erb new file mode 100644 index 0000000..38b7d70 --- /dev/null +++ b/app/views/matches/edit.html.erb @@ -0,0 +1,6 @@ +

Editing match

+ +<%= render 'form' %> + +<%= link_to 'Show', @match %> | +<%= link_to 'Back', matches_path %> diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb new file mode 100644 index 0000000..d8122ac --- /dev/null +++ b/app/views/matches/index.html.erb @@ -0,0 +1,27 @@ +

Listing matches

+ +
Tournament
<%= match.tournament %> <%= link_to 'Show', match %> <%= link_to 'Edit', edit_match_path(match) %> <%= link_to 'Destroy', match, method: :delete, data: { confirm: 'Are you sure?' } %>
+ + + + + + + + + + + <% @matches.each do |match| %> + + + + + + + <% end %> + +
Tournament
<%= match.tournament %><%= link_to 'Show', match %><%= link_to 'Edit', edit_match_path(match) %><%= link_to 'Destroy', match, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%= link_to 'New Match', new_match_path %> diff --git a/app/views/matches/index.json.jbuilder b/app/views/matches/index.json.jbuilder new file mode 100644 index 0000000..c8ada7a --- /dev/null +++ b/app/views/matches/index.json.jbuilder @@ -0,0 +1,4 @@ +json.array!(@matches) do |match| + json.extract! match, :id, :tournament_id + json.url match_url(match, format: :json) +end diff --git a/app/views/matches/new.html.erb b/app/views/matches/new.html.erb new file mode 100644 index 0000000..bd4c78c --- /dev/null +++ b/app/views/matches/new.html.erb @@ -0,0 +1,5 @@ +

New match

+ +<%= render 'form' %> + +<%= link_to 'Back', matches_path %> diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb new file mode 100644 index 0000000..7bab721 --- /dev/null +++ b/app/views/matches/show.html.erb @@ -0,0 +1,9 @@ +

<%= notice %>

+ +

+ Tournament: + <%= @match.tournament %> +

+ +<%= link_to 'Edit', edit_match_path(@match) %> | +<%= link_to 'Back', matches_path %> diff --git a/app/views/matches/show.json.jbuilder b/app/views/matches/show.json.jbuilder new file mode 100644 index 0000000..2e45395 --- /dev/null +++ b/app/views/matches/show.json.jbuilder @@ -0,0 +1 @@ +json.extract! @match, :id, :tournament_id, :created_at, :updated_at -- cgit v1.2.3-2-g168b From fefe3f469243d6c932c256cc8798bae35e4ff1c4 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Sun, 2 Mar 2014 21:10:49 -0500 Subject: Added Tournament Name. --- app/views/matches/_form.html.erb | 4 ++++ app/views/matches/index.html.erb | 2 ++ app/views/matches/index.json.jbuilder | 2 +- app/views/matches/show.html.erb | 5 +++++ app/views/matches/show.json.jbuilder | 2 +- 5 files changed, 13 insertions(+), 2 deletions(-) (limited to 'app/views/matches') diff --git a/app/views/matches/_form.html.erb b/app/views/matches/_form.html.erb index 34494c3..c5f1ba8 100644 --- a/app/views/matches/_form.html.erb +++ b/app/views/matches/_form.html.erb @@ -15,6 +15,10 @@ <%= f.label :tournament_id %>
<%= f.text_field :tournament_id %> +
+ <%= f.label :name %>
+ <%= f.text_field :name %> +
<%= f.submit %>
diff --git a/app/views/matches/index.html.erb b/app/views/matches/index.html.erb index d8122ac..0742770 100644 --- a/app/views/matches/index.html.erb +++ b/app/views/matches/index.html.erb @@ -4,6 +4,7 @@ Tournament + Name @@ -14,6 +15,7 @@ <% @matches.each do |match| %> <%= match.tournament %> + <%= match.name %> <%= link_to 'Show', match %> <%= link_to 'Edit', edit_match_path(match) %> <%= link_to 'Destroy', match, method: :delete, data: { confirm: 'Are you sure?' } %> diff --git a/app/views/matches/index.json.jbuilder b/app/views/matches/index.json.jbuilder index c8ada7a..08ae0ef 100644 --- a/app/views/matches/index.json.jbuilder +++ b/app/views/matches/index.json.jbuilder @@ -1,4 +1,4 @@ json.array!(@matches) do |match| - json.extract! match, :id, :tournament_id + json.extract! match, :id, :tournament_id, :name json.url match_url(match, format: :json) end diff --git a/app/views/matches/show.html.erb b/app/views/matches/show.html.erb index 7bab721..0b02ae7 100644 --- a/app/views/matches/show.html.erb +++ b/app/views/matches/show.html.erb @@ -5,5 +5,10 @@ <%= @match.tournament %>

+

+ Name: + <%= @match.name %> +

+ <%= link_to 'Edit', edit_match_path(@match) %> | <%= link_to 'Back', matches_path %> diff --git a/app/views/matches/show.json.jbuilder b/app/views/matches/show.json.jbuilder index 2e45395..128550f 100644 --- a/app/views/matches/show.json.jbuilder +++ b/app/views/matches/show.json.jbuilder @@ -1 +1 @@ -json.extract! @match, :id, :tournament_id, :created_at, :updated_at +json.extract! @match, :id, :tournament_id, :name, :created_at, :updated_at -- cgit v1.2.3-2-g168b