Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Hi! I cleaned up your code for you! #4

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+2 −2
Split
View
@@ -14,14 +14,14 @@ Here's a quick (and slightly insane) example:
validates_presence_of :command
def run; `#{command} #{args}`; end
end
-
+
# views/commands/new.html.erb
<%= form_for @command do |form| %>
<%= form.text_field :command %>
<%= form.text_field :args %>
<%= form.submit "Do It!" %>
<% end %>
-
+
# controllers/commands_controller.rb
def create
command = Command.new(params[:command])