Well, it’s been a while and I plan to get back into the swing of posting. I have been busy working on my Ruby on Rails site. It will always be a work in progress. As I work on it I plan on posting code here of things that I use on the site. I’d like to share my code in the event I may help others or others may have something to add to what I am doing.
Coming next will be why I have had the big delay in between posts. Most notably is due to design issues with my site. I have done quite a few versions, but was never really happy with what I had come up with. I’ll post screenshots of what I did so you all can see the designs.
The other reason is I was at RubyConf in Charlotte, NC. I saw and met quite a few people. I met up with Joe O’Brien, Michael Buffington, Marcel Molina, Chad Fowler, David Black, Geoffrey Grossenbach, Alex Payne, Evan Light, Obie Fernandez, Scott Barron and others. It was a great time. I miss it already. I learned quite a bit.
Finally, I started up a Cleveland/Northeast Ohio Ruby Users Group. We had our first meeting and the next meeting I am planning on giving a talk about Ruby. This will be followed by a talk by Joe Fiorini on Ruby on Rails. Should be a good time.
I’ll finish up with some code that I used on my site:
I like it when sites use a design that has an index page that differs from the rest of the site. To do this with Rails is easy. All you have to do is to use 2 different layouts for your 2 different designs. I first created a site controller for all the pages on my site. Then inside the site controller I added the following code:
layout :choose_layout
private
def choose_layout
if [ 'index' ].include? action_name
‘index’
else
’subPage’
end
end
This is pretty much saying that if we are going to access the index action, then display the index layout otherwise use the subPage layout. Very easy.
Take care
Mike Riley
0 Responses to “The latest”