Follow Along as I Stumble on the Path to Learning RoR

Posts tagged “view

ActiveAdmin Translation Missing Error

I was receiving a translation missing message that was showing up on my page views for my ActiveAdmin page.  To correct this, I found the solution on Stack Overflow which said that these translations were just missing from my en.yml file in locales, and to replace my existing one with the one here (that ActiveAdmin uses):


Simple Authentication with Rails 3.1

If you need a simple authentication, for example some views that only one person should have access to, you might consider:

http_basic_authenticate_with :name => "username", :password => "pass"

provided by Rails 3.1, it’s a way to protect some pages that only a select few may need access to. Just place that in your controller.
To limit the actions this applies to, you can add :only or :except such as:

http_basic_authenticate_with :name => "username", :password => "pass", :except => :index

Where to put code?

It was confusing for me figuring out where to put logic.  As it turns out, I had way too much code in my controllers and views – this should have been in my models and helpers.

This is a great post:


Also, view: