Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Sinatra jQuery Mobile App Chunk 4
get '/' do
@events = Event.all(:order => :time.desc)
haml :index
end
get '/new/?' do
haml :new
end
post '/new/?' do
begin
Event.create(
:time => Time.parse(params['time']),
:type => params['type'],
:description => params['description']
)
redirect '/'
rescue
haml :new
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.