summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grita.rb3
-rw-r--r--views/error.haml4
2 files changed, 2 insertions, 5 deletions
diff --git a/grita.rb b/grita.rb
index 76f1c93..180fe19 100644
--- a/grita.rb
+++ b/grita.rb
@@ -17,8 +17,7 @@ get '/' do
end
post '/' do
- @grito = Grito.new(:title => params[:title], :text => params[:text])
- @grito.save
+ @grito = Grito.create(:title => params[:title], :text => params[:text])
haml :index
end
diff --git a/views/error.haml b/views/error.haml
index ed2713f..7de3a5b 100644
--- a/views/error.haml
+++ b/views/error.haml
@@ -1,4 +1,2 @@
%h1 ERROR
-%p Un error ha ocurrido. Revisa que la página esté bien escrita.
-%p
- =env['sinatra.error'] \ No newline at end of file
+%p Un error ha ocurrido. Revisa que la página esté bien escrita. \ No newline at end of file