archan937 / rich_cms

Enrichments (e9s) module for a pluggable CMS frontend
http://codehero.es/rails_gems_plugins/rich_cms
MIT License
42 stars 16 forks source link

I have been trying to add Devise authentication support #6

Closed kristianmandrup closed 13 years ago

kristianmandrup commented 13 years ago

Please help in that effort. I can't seem to figure out parts of your code - too much magic going on in complicated one liners etc.

archan937 commented 13 years ago

Hi Kristian,

I appreciate your effort in extending Rich-CMS! As you might have noticed the last week, I am busy adding tests for my gems. Once I have a decent test suite, I will merge your code and work to a new release. That will be this week hopefully! I'm working on it right now ^^ I will keep you posted.

Greets, Paul.

kristianmandrup commented 13 years ago

Great! Yeah, that was another problem. No tests, so really hard to figure out what is going on and how to add/patch functionality.

On a side note I think you should read "Refactoring Ruby edition". To me your code is not as expressive as it could be and you seem to like complex one-liners, which makes it really hard for others (and eventually yourself) to grasp what is going on ;) I recommend you use many more more little helper methods both as documentation and to DRY things up and make it more clear. In fact it is recommended practice to almost completely avoid using local variables and case statements... reading that book revolutionized by own understanding of how to write clean code :)

I really need devise support for Rich CMS, but I can wait till after New Year. Cheers and merry X-mas!

http://www.amazon.com/Refactoring-Ruby-Jay-Fields/dp/0321603508

archan937 commented 13 years ago

Please check you inbox!