Today was productive. I was able to create a more in-depth TODO file during the day while I was watching my kiddos. This allowed me to think more about how my app was going to function and what I needed/wanted to build into it. It provided me with a better workflow for the evening. I knew exactly what I would be working on tonight. Even if I did get sidetracked a couple times while working it was still always productive. Granted a lot is going into making the app look better than a default Bootstrap install. I got Omniauth through Devise up and running tonight smoothly by following the docs. The only snag I hit for a quick minute was in my using of dotenv
.
# First try
config.omniauth :facebook, FB_APP_ID, FB_APP_SECRET
# Second try
config.omniauth :facebook, 'FB_APP_ID', 'FB_APP_SECRET'
# Third and correct try
config.omniauth :facebook, ENV['FB_APP_ID'], ENV['FB_APP_SECRET']
This was pretty easy to troubleshoot. The first try threw an error. The second try had FB_APP_ID
in my Oauth URL telling me that the string was being passed (makes sense). Then one more reading of the docs and I got the correct implementation.
I also had to figure out how to render a proper looking Bootstrap button as a link using Rails helpers. Okay, I didn’t have to but I wanted to. After playing around for a bit I decided on this code:
<%= button_to 'Add Your First Place', new_place_path, class: 'btn btn-primary', method: :get %>
Which isn’t the prettiest but is getting the job done correctly. I want to add a Font Awesome icon inside the button and I think to do that I’ll have to pass a block in. I’m going to work on that tomorrow though. It’ll be a useful thing to figure out so I can stylize the OAuth login buttons better. The one I have right now is currently just a text link. We all know that’s no fun.
I also went to a meetup tonight where the presenter talked about Elm. It’s a functional language which is definitely different. However, the presenter said that he felt Elm was a great starter to learn a functional language. I’ll probably look into this when I finally have some free time after I’m done with Flatiron. Elixir is of interest but it might be too big of a jump to start. We’ll see. I could possibly also keep building things in the languages I’m learning to show more mastery of those until I land my first gig then start branching off. Another one out there is Hanami built on Ruby which I’ve heard is pretty cool and built more like other frameworks and libraries than Rails. That might be the next logical step. There’s just so much knowing what to do next is a research project in its own right. I look forward to it though.
My newest obsession which I learned at the meetup tonight is leading commas:
new_person = { name: "Seth"
, age: 32
, height: 74
, weight: 155
, alive: true
}
I’ll just leave that there.
Time spent today: 2:19
Time spent total: 306:57
Lessons completed today: 0
Lessons completed total: 518