blog.federicomaffei.com

current level - articles for beginners

Day 58 - Project Day 3.

class Job < ActiveRecord::Base
    
    validates :advert_title, presence: true, length: { maximum: 40, minimum: 5 }
    validates :company, presence: true, length: { maximum: 40, minimum: 3 }
    validates :address, presence: true
    validates :wage, numericality: { only_integer: true }
    validates :email, format: { with: /\A[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})\z/ }

    belongs_to :employer

    geocoded_by :address
    after_validation :geocode

end

Productive day, today, even if tiring as usual.

I notice that, at night, even if only a few hours passed since I coded, I can hardly remember exactly what happened to me during the day. Not to mention if I start thinking about the days before! It's all a confused blur of Ruby lines, team talking and a coffee every once in a while. I guess that everything will make sense when the course will be finished and the project will be out!

The WorkMap application is alive and kicking, if you were curious about it. If you weren't, no problem, it's going to be so famous you'll talk about it to your friends not too far along the line, chief.

The lion's share of work is still Google Maps related, since we are trying to filter the results on the map and show only the relevant results to the job-searching-user.

OK, OK, I'll post a glimpse of the main page. Taken at 9pm, while still trying to make it work.

PREVIEW

More things to come in the next days. I'll sleep when I'm dead.

comments powered by Disqus