← Home

Mephisto article list pagination plugin

Update: The following information is most probably outdated. Please refer to the Mephisto Plugin: Paged Article Lists project page.

Searching for advice on how to do this the right way in Ruby on Rails I've found a lot of interesting stuff ... I just haven't found anything about how to overwrite an existing applications controller action - something that I considered necessary for that pagination functionality I wanted to realize. If you happen to be able to tell me something about this, please do.

So here's what I've been able to come up with myself.

I hook into the ActionController's before_filter and overwrite the entire method from there! Uuuuuuuha. Yes, I consider this aproach to be rather brutally hackish and ugly. It actually disturbs me if I look at this! I just don't know how to do it in a more apropriate way. Is there any?

([Update] I've found a less hackish way to overwrite the Controller in the meantime. I'll put some notes together about some useful plugin dev techniques that I've collected.)

Here's the code:


[Update] I've added some notes on how to use this plugin.