testing ruby

Erb code posted by asdf
created at 14 Apr 03:05, updated at 18 Apr 10:38

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!-- index.html.erb -->
<% form_tag products_path, :method => :get do %>
  <p>
    <%= text_field_tag :search, params[:search] %>
    <%= submit_tag "Search", :name => nil %>
  </p>
<% end %>

<!-- new.html.erb -->
<% form_for @product do |f| %>
  <p>
    <%= f.label :name %>
    <%= f.text_field :name %>
  </p>
  <p><%= f.submit "Create" %></p>
<% end %>
372 Bytes in 4 ms with coderay