summaryrefslogtreecommitdiff
path: root/app/views/agents/_form.html.erb
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2015-02-03 21:30:13 -0700
committermo khan <mo@mokhan.ca>2015-02-03 21:30:13 -0700
commit2085d8aecbfb095bbf9989a56dd74dc89f1d2a3e (patch)
tree45ab2811e6eb29364dfb526e21727735bbd7e11b /app/views/agents/_form.html.erb
parentbab5e66e261774700eb3ad515eb929fc85991a69 (diff)
add association from agents to events.
Diffstat (limited to 'app/views/agents/_form.html.erb')
-rw-r--r--app/views/agents/_form.html.erb21
1 files changed, 21 insertions, 0 deletions
diff --git a/app/views/agents/_form.html.erb b/app/views/agents/_form.html.erb
new file mode 100644
index 0000000..fe9d10e
--- /dev/null
+++ b/app/views/agents/_form.html.erb
@@ -0,0 +1,21 @@
+<%= form_for(@agent) do |f| %>
+ <% if @agent.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@agent.errors.count, "error") %> prohibited this agent from being saved:</h2>
+
+ <ul>
+ <% @agent.errors.full_messages.each do |message| %>
+ <li><%= message %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :hostname %><br>
+ <%= f.text_field :hostname %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>