Skip to content

Instantly share code, notes, and snippets.

04a9f74fcf63d1264409bbf9e9c5120542d1d67efb643067b31e730b507058d3838a3fde69a85efeb37c6622ce1b8be9f9a6d8e870fa534832b0c2b6b95ff18055
0xFb53d608BdCa12b373d1F49e5F920e27fF295018

Keybase proof

I hereby claim:

  • I am rloomba on github.
  • I am rpl (https://keybase.io/rpl) on keybase.
  • I have a public key ASC3Tc3P1RlXstwodosCX0xzZtcAvLghvKKvnaNxSK6CBgo

To claim this, I am signing this object:

ActionController

In Sinatra, routes/controllers/actions combined into one entity. In rails, these things are separate. There are seven main actions: index, show, create, new, edit, update, destroy

1. Rails Routing

    posts GET    /posts(.:format)          posts#index
          POST   /posts(.:format)          posts#create
 new_post GET    /posts/new(.:format)      posts#new
class Game
def initialize
@board1 = Board.new
@board2 = Board.new
end
def user_ship
puts "Please enter a starting position for your battleship"
b_position = gets.chomp