Skip to main content
0 online
iwz iwz

Also got some basic role authentication working using acl_system.
http://brainspl.at/articles/2006/02/20/new-plugin-acl_system

It's pretty nice. It doesn't offer model based authentication tho.

For instance, using it I can make sure that only Administrators or Moderators are allowed to run Delete or Edit on something, but I can't allow the owner of a specific record to run Edit or Delete on it. Or I can't restrict access to the moderator forum to only moderators.

I could easily do all the restrictions using just normal logic checks in each action in the controllers, but it would be nicer if I could implement some of the logic in the models.

iwz iwz

Found model_security: http://perens.com/FreeSoftware/ModelSecurity/Tutorial.html

It's a generator that creates an authentication system including security at the model level. Very nice looking. I've installed it and am starting to modify the generated files to match my needs.

iwz iwz

So, I started down the road of implementing model_security, and I eventually backed off.

It seemed to reaaally slow down page times. And it was problematic with forms in partials. It's got some great ideas, but, maybe it's a little more than I need.

So, I removed model_security, and instead went to a simpler design. I'm just putting readable_by?(user) and editable_by?(user) methods into my models that define the rules. Then I check the appropriate method in my controllers. @model.readable_by?(current_user)

Hey, it works! haha

I also worked on Polls a bit. I've got the tables cleaned up, the data migrated, and the polymorphic associations in my models. so, the Topic class now has_many :polls, :as => :pollable, and the Poll class belongs_to :pollable, :polymorphic => true

I've gotten the polls working in View mode, and also attached to Topics. I have to get voting working, as well as clean up the scaffolding for creating/editing new polls.

Less than two weeks till I have to move the site! :( And I still haven't gotten a new host!

deanh77 deanh77Founder

you've probably heard of it, but textdrive hosts rails sites:

http://www.textdrive.com/hosting

$12/month for shared hosting.

iwz iwz

yeah, everybody's site on there seems real slow tho. dreamhost does hosting for $7.95/mo and they support RoR. i've only heard slightly better things about them. i also have a coupon that gives you a free year of hosting.

but i found another guy that might do it for me for what i'm paying now. hopefully i'll find out this week.

Welcome Back to eZabel

It's been a while. Here's what's new.

eZabel Lore

A complete history of our community — stats, Hall of Fame, legendary threads, and more.

View the Lore →

Everything Preserved

All 225,969 pieces of content from 2000–2014 are here — forums, messages, journals, photos, polls, and events.

💎

Gems

Spot something you love — a legendary comment, a classic thread, a great photo? Log in and click the diamond icon to mark it as a Gem. Add a note about why it's special. The best stuff surfaces on the Gems page.