class House
def recite
(1..pieces.length).map {|i| line(i)}.join("\n")
end
def line(number)
"This is %s.\n" % pieces.last(number).join(' ')
end
- GET
api/v1/users(index) - POST
api/v1/users(create) - PUT
api/v1/users(update) - GET
api/v1/users/:id(show)
Don't forget tests :)
$ rails new funclub --database=postgresql
Date formating: http://www.foragoodstrftime.com/
http://api.rubyonrails.org/classes/ActiveModel/Validations/ClassMethods.html
*validate(args, &block)
Adds a validation method or block to the class. This is useful when overriding the validate instance method becomes too unwieldy and you're looking for more descriptive declaration of your validations.
This can be done with a symbol pointing to a method:
class Comment
It's time to setup your AWS bucket so your photos can persist on the internet. Instead of pushing photos to your local machine, you will be pushing them to an Amazon Web Service cloud.
You will need your credit card for doing this. It's free to use but be forewarned, be careful not to push your AWS credentials up to any public domains or somebody could use your credit card.
Before we begin let's get our app setup for Amazon Web Services(AWS):
###Adding Fog Gem and Carrierwave Configs