Testimony: Update
Oh, one last thing… the admin portions are still ugly and in most cases in their default scaffold state but an update is in the works and coming soon.
Thanks!
No Comments »
Filed under: Rails, walkthrough
Connecting ideas to code
Oh, one last thing… the admin portions are still ugly and in most cases in their default scaffold state but an update is in the works and coming soon.
Thanks!
No Comments »
Filed under: Rails, walkthrough
First, let’s cover the layout changes. As we all know, when it comes time to render a view, Rails will look for a layout of the same name, unless otherwise directed. The layout that’s being used here is called testimonial.rhtml, lives in the views/layouts folder and looks something like the following:
No Comments »
Filed under: Rails, walkthrough
I’ve posted about e - the text editor before, head on over to ErrTheBlog for a handy cheatsheet. Even better, grab their gem and get access to many cheat sheets right from your commandline. Way cool!
It’s been awhile since the last installment of the testimonial walkthrough but work continues. I hope to have the next one up sometime this week. Stay tuned for further updates….
No Comments »
Filed under: Rails
Just so we have some useful language that we can use to talk about our users, let’s define some roles.
No Comments »
Filed under: Rails, walkthrough, webdev
Note: The Testimony app is now live. This url will always for the latest installment in this series.
Before we go too much farther, we need to make a couple of adjustments to the default behaviour. The first revolves around time: ActiveRecord stores time in local time by default. In today’s world, applications should be storing time as UTC, especially on a server. To make Rails use UTC, set default_timezone = :utc as shown below.
The second tweak involves sessions. Out of the box, Rails tracks user sessions in the file store (i.e., on disk). I prefer to store mine in the database for ease of use, management, and better performance, and if this app needed to scale I’d want to look at using memcached. Luckily, ActiveRecord knows how to use a table for session data. First, change the session_store to be the database:
config.action_controller.session_store = :active_record_store config.active_record.default_timezone = :utc
No Comments »
Filed under: Rails, walkthrough, webdev