Tumblr is where tens of millions of creative people around the world share and follow the things they love.Sign up to find more cool stuff to follow
Session 2: Rails First Pass
During this session we began examining the command line API for Rails using generators to create the models, views, and controllers for a couple objects within a simple event registration app. The scaffold generator allows the simultaneous creation of all the basic files needed for a “resource” from the migration that creates the database table to hold the records, to the model that will define the behavior attached to those records, to the controller and views that all basic CRUD operations on the data.
We are guiding the students through a small application that will track guests coming to a fundraising event and the student that sold the ticket. So we started with the Seller model with a few basic fields. Almost as soon as we first looked at the “New” form for the Guest model, the limitations of the generated scaffold code became apparent. The Guest model holds a reference to a Seller and the scaffolded view shows the default interpretation of a Seller object as a string.
We gave the team a brief overview of how actions lead to a view and a layout in order to construct a full HTML response.
We introduced associations, linking Guests with Sellers. Then we changed the form to use an HTML <select> tag present the available Sellers by email and return its database ID as the value. Finally, we created a custom method to replace the to_s method in Seller to facilitate easily changing the drop-down display from email to a first and last name.
The teams worked as pairs for the first time and were encouraged to “tap in” if they wanted control of the keyboard. We expect that this will become more natural as they begin driving the process compared to the more “learning/following” mode that we’re in right now.
Of course, there were also a number of smaller, sometimes unintentional, lessons along the way:
- the power of listening (aka, do as I “say”, not as I “wrote”)
- rake db:migrate:redo
- changing a text_field into a select for a simple range
- instance variables in the controller
Getting my mojo back...
one run at a time. Actually joined the running group today. Session 1 (which is finishing in a week, I think) went down to the waterfront and Session 2 (which just started) went up to Leif Erickson. I’m in both so I could do either. I decided to do the run up to Leif Erickson. Running from the FitRight start, once you cut over to Thurman, is all up hill. All up hill on the way there, all downhill on the way back. 5 miles. Sweated buckets.
I also did the measurement thing. It’s all voluntary but I skipped it in January. They measure your flexibility, your weight and your abdonimal circumference and you write it on a paper and hand it to Jeremy, who puts it into a spreadsheet. I wasn’t going to look at the paper, but we were the ones that had to write it down, so I kinda had to know the numbers. Which sucked. We’ll have them taken again in October. My goal is to see a big difference in those numbers.
And tonight I meet Michelle, Bonnie(!!), and Nicole at Champoeg State Park for a 5k and mexican feast. Woot!!
“Kids don't have to turn out just like their parents, and I'm glad. Our past does not have to be our future, and I am glad. God's mercies are new every single morning, and I'm going to tell you something brother, I am glad about that. The evil one will not get the last say, and I am glad about that. Our enemy will fall into the trap that he set for us, and I, for one, am glad about that. For all those who love God and are called according to His purpose, everything has to work out for our good, and I am glad about that. We have not out-sinned Christ ability to forgive us, and I am mighty glad about that. Christ will come back and He will claim His kingdom, and I am glad about that. There is a world coming where there will be no more bad news, no more crying, no more sickness, no more death, and I am glad about that. The last enemy Christ will slay is death, and I am glad. Psalm 126:3 says "The LORD has done great things for us; and we are glad.”—Beth Moore
My Rejection Collection
Pablo the tiny dog sits calmly on my lap while I continue to pour my heart out to my therapist.
Today she’s talking to me about why I continue to put myself out there with my unresponsive family.
“I guess I feel like I need to be the bigger person, ” I say with some question in my voice, “to continue to let them know that I’m still here, and that I still want them in my life.”
She’s scribbling as always.
“Mhmm, interesting,” she says as her hand pauses, “so you feel like you have nothing left to lose?”
“…that you might as well keep reaching out because what’s the worst thing that could happen...”
“Yes. Exactly,” I say as I pet Pablo.
She looks me in the eye and strokes her long grayish hair, “And have you ever thought that although you may have nothing to lose, what you DO have to gain is rejection? And that that rejection is more damaging than anything you could lose because it keeps happening again, and again, and again?”
“Wow,” I say after a long silence of letting her words soak in, “I have NEVER thought of it that way.”
“My advice to you to only reach out when you expect absolutely nothing in return, and I mean ABSOLUTELY NOTHING,” she looks me square in the eye as she says this and kind of points her pen at me as if she’s my 2nd grade teacher.
This lady is GOOD.
And she was right. I keep putting myself out there. I keep sending Christmas cards, and emails. For SIX YEARS I have been making phone calls to them, with not a single call in return. I have always thought ‘what do I have to lose”? But in reality I was gathering the rejection in heaping piles and burying it deep in my heart.