Static Pages in Rails

I recently came across a legacy Rails application that had an interesting approach to implementing static pages. This app is basically leveraging on the rails_admin gem to provide a basic form of CMS for building static pages and a controller that parses the friendly slug to render the content. It’s certainly a serviceable solution, however it also comes with it’s own set of complexity such as introducing the friendly_id gem and a category model to separate the content for something that’s unlikely to exceed more than 10 records.

After some thoughts I basically determined that there will ever be just 5 static pages; About Us, Terms of Use, Privacy Policy, Contact Us and FAQ for this project. Enter Thoughtbot’s high_voltage gem. high_voltage was designed to address this very common use-case. If you just need static pages that does not require frequent updates or data driven content, high_voltage fits the bill very well.

To get started, all you need is to bundle the gem in your project.

And do the following:

Then link the pages like so in your app:

And that’s pretty much all you need to start adding new content.

As a general rule, if a page that you’re building does not require frequent updates or simply does not add any business value or logic to the site, it probably better to build it as a static page with as simple backend like high_voltage. Having static pages as views in your app also gives us the benefit of having highly customized CSS/HTML layout design as opposed to a database backed model which makes high fidelity design and content difficult to insert, eg. managing media assets. However, if your solution does require extensible pages being created, you should probably be looking at CMS solutions such as Radiant CMS than building your own solution anyway.

Be sure to check out their Gem for some idea of how you could still manage custom content within a layout for your static pages.

Thoughtbot – High Voltage
https://github.com/thoughtbot/high_voltage
http://thoughtbot.github.io/high_voltage/

sferik – Rails Admin
https://github.com/sferik/rails_admin

norman – Friendly Id
https://github.com/norman/friendly_id

Radiant CMS
http://radiantcms.org/

Review : Inside (PC)

From the studio that brought us the critically acclaimed puzzle platformer Limbo, comes Inside. Inside follows a nameless boy evading unknown pursuers as he traverses from the country side into a large mysterious industrial complex.

INSIDE_06

The game has zero dialog and the story is conveyed solely through the boy’s actions and visuals of the game. Throughout the game little is known about the pursuers nor the boy’s motive in the game and the player is left to fill in those gaps. Game controls, like Limbo, follows the four basic actions, moving forward, backward, jump and a trigger action which activates when he is near a gear or a switch.

Inside introduces new game mechanics every other level which makes each chapter of the story unique and challenging. These chapters themselves transitions seamlessly to the next. Unlike Limbo however, Inside is more forgiving in the sudden death department, but each time the boy meets his untimely end, it is often animated with gruesome effect.

gif2

The overall theme and atmosphere in Inside is reminisce of Valve’s Portal with it’s large sprawling industrial complex. The visuals and aesthetics in this game is top notch and will certainly leave a lasting impression long after you finished the game. Inside‘s sound design deserves some praise as it really adds to the eerie feel of the game.

INSIDE_02

I took about 4 hours to finished the game, though it’s not a long game but the story and ending leaves you thinking about it long after the game credit ends. Inside is certainly a game to be experienced.

Steam – Inside
http://store.steampowered.com/app/304430/

Playdead – Inside
http://www.playdead.com/games/inside/

Evernote Basic Pricing Updates

As some of you may already know, Evernote is changing their pricing policies for the Basic account. Come August, if you’re an existing Basic account user, your notes will only be synced on 2 devices unless you upgrade to their Plus and Premium accounts. Here’s an excerpt from their email which I received a couple of weeks back.

At Evernote, we are committed not only to making you as productive as you can be, but also to running our business in as transparent a way as possible. We’re making a change to our Basic service, and it’s important that you know about it.

In the coming weeks, Evernote Basic accounts will be limited to two devices, such as a computer and phone, two computers, or a phone and a tablet. You are currently over this limit, but will have at least 30 days to adjust. Plus and Premium accounts will continue to support access from an unlimited number of devices.

Being a long time light Evernote user, I’ve always managed to kept myself well within the Basic account constraints (upload limit etc), but it appears that they’re really pushing basic users like us to start paying for their service. One workaround that I’ve discovered is that you’re still able to Share entire notebooks with another user with no penalty on the device syncing counter.

While I used to sync my notes between my work and personal laptops with a single account, I’ve now signed up for an Evernote account using my work email and shared my notebook with this account instead. Everything still works like it should with the exception that you’ll need to click “Refresh” note if it detects that the notes are out of sync. Updates on this note will also be synced upstream to your original note.

It probably won’t be long before Evernote decides that notes sharing should also be part of the paid tier pricing, but for now this works just fine for me.