Monday, October 12, 2015

Straightforward Rails Authorization with Pundit

pundit

This is a second article in the "Authorization with Rails" series. In the previous article, we discussed CanCanCan, a widely known solution started by Ryan Bates and now supported by a group of enthusiasts. Today I am going to introduce you a bit less popular, but still viable, library called Pundit created by the folks of ELabs.

"Pundit" means "a scholar", "a clever guy" (sometimes used as a negative description), but you don't need to be a genius to use it in your projects. Pundit is really easy to understand and, believe me, you'll love it. I fell in love it when I browsed its documentation.

The idea behind Pundit is employing plain old Ruby classes and methods without involving any special DSLs. This gem only adds a couple of useful helpers, so, all in all, you can craft your system the way you see fit. This solution is a bit more low-level than CanCanCan, and it is really interesting to compare the two.

In this article we will discuss all of Pundit's main features: working with access rules, using helper methods,
and scoping and defining permitted attributes.

Continue reading %Straightforward Rails Authorization with Pundit%


by Ilya Bodrov-Krukowski via SitePoint

Popmotion – Javascript Motion Engine

Popmotion is lightweight JavaScript motion engine. Make it pop with animation, physics, and input tracking.


by via jQuery-Plugins.net RSS Feed

WP_Query Arguments: Author, Search, Password, Permissions, Caching and Return Fields

Vincent Tavano

opl-small

One Page portfolio for 'Vincent Tavano' featuring AJAX loading project overlays. Real cool effect when hovering over client names that trigger relevant background videos. Not a fan of websites that "block" content loading on smaller screens (when they are not optimised) but this has a neat tile effect on mobile.

by Rob Hope via One Page Love

Manchester in Mind

Manchester in Mind

Responsive event site for the upcoming 'Manchester in Mind' design exhibition. The One Pager features a hexagon-themed design and a neat sticky header navigation kicked off by a hamburger icon.

by Rob Hope via One Page Love

HWAIW

HWAIW

Colorful landing page with a few illustrations on a subtle texture for marketing book 'HWAIW'.

by Rob Hope via One Page Love

How to Create Instagram Ads

rs-create-instagram-ads-560

Do you use Instagram for business? Interested in running ads? Instagram advertising gives businesses and brands an effective way to increase visibility and connect with customer and prospects. In this article you’ll discover how to create Instagram ads for your business. #1: Connect Your Instagram Account to Facebook Before you can start advertising on Instagram, you need […]

This post How to Create Instagram Ads first appeared on Social Media Examiner.
Social Media Examiner - Your Guide to the Social Media Jungle


by Ross Simmonds via Social Media Examiner