Skip to content

Instantly share code, notes, and snippets.

Avatar

Jasim A Basheer jasim

View GitHub Profile
View rails_like_sinatra.rb
# Main sinatra app
require 'sinatra'
require 'activerecord'
require 'activesupport'
include ActionView::Helpers::DateHelper # add the required helpers here.
require 'controllers.rb'
# controllers.rb
View gist:391462
a=[10,20,30,40,50]
a.each_index {|i| if a[i] > 20
return i
}