Mijn schoonzus heeft vandaag het leven geschonken aan een knappe jongen, Matse!
Een dikke proficiat! Zal wel zijn!
Ik heb een object met een description attribute. Wanneer je dan een link legt naar de details van dat object is het in dit geval wel tof om ook al een stuk van (of de volledige) description te laten zien on hover.
Als fan van jQuery, ben ik zoek gegaan naar een plugin. Simple tooltip leek me wel ok.
Usage
{% highlight html %} Tada {% endhighlight %}
{% highlight javascript %} $(“a.link-with-tooltip”).simpletooltip(); {% endhighlight %}
Problem
Works like a charm! Er was echter nog een klein probleem. Wanneer de text in het title attribute te lang is verdwijnt ie gewoon links van het scherm, zoals in dit screenshot.
Solution
Ik heb dat opgelost door een max-width op #simpletooltip te zetten.
{% highlight css %} max-width: 400px; {% endhighlight %}
/me happy
Wat moeten we daar nu weer van denken? Onderstaande hebben we deze morgen van de postbode gekregen. :)
Ha! Een nieuwe rails plugin: Roleify, a rails authorization plugin.
Deze plugin komt uit een lopend project van ons en ik dacht zo, we zullen die maar ineens opengooien. Ik heb er nog wel wat plannen mee, dus het zal zeker hier en daar nog wijzigen.
Here goes:
Roleify
A Rails authorization plugin
Dependent on Clearance (should be configurable in the future though)
Example
Make sure your User object has a “role” attribute (String).
Add an initializer
{% highlight ruby %} Roleify::Role.configure(“role_a”, “role_b”) do { :role_a => { :issues => :all }, :role_b => { :issues => “index” } } end {% endhighlight %}
In the example above “role_a” and “role_b” are the roles you are defining. The block contains the rules for these roles. There is no need to define an “admin” role, since it’s added by default.
- Users with role “role_a” are allowed to access all of IssuesController actions.
- Users with role “role_b” are only allowed to access the index action of the IssuesController.
- Users with role “admin” are allowed to access all actions of all controllers.
The controller
{% highlight ruby %} class IssuesController < ActionController::Base include Clearance::Authentication include Roleify::RoleifyableController end {% endhighlight %}
The User model
{% highlight ruby %} class User < ActiveRecord::Base include Clearance::User include Roleify::RoleifyableModel end {% endhighlight %}
Extra’s
Constants:
{% highlight ruby %} Roleify::Role::ADMIN Roleify::Role::ROLE_A Roleify::Role::ROLE_B {% endhighlight %}
Named scopes are automatically added:
{% highlight ruby %} User.admins User.role_as User.role_bs {% endhighlight %}
Methods:
{% highlight ruby %} User.admin? User.role_a? User.role_b? {% endhighlight %}
Questions? Shoot!
Zullen we beginnen met wat RubyFest is?
RubyFest is a Dutch user group of the Ruby programming language. We’re focussed on Ruby users in the South of the Netherlands and the Flemish part of Belgium. However, every Ruby enthusiast is very welcome at our meetups!
Hoe? Wat? Waarom? Wel, ik vond dit deze namiddag in mijn mailbox:
Dear (Ruby) Software Developer,
We would like to invite you to join us during the first edition of RubyFest! RubyFest is a meetup/mini-conference for software developers working with - or interested in - the programming language Ruby. RubyFest is scheduled to take place on May 14th in Eindhoven (NL). We will start in the afternoon with two (technical) presentations, the first presentation will be given by Ariejan de Vroom (Kabisa ICT) about Git and the second presentation slot will be filled with a live video presentation by Geoffrey Grosenbach (Topfunky Corporation, Peepcode Screencasts) and a short Q&A session with Geoffrey. The presentation section will be followed by an informal gathering as an opportunity to get in touch with the community in our region.
Natuurlijk zal ik er zijn. Meer info @ eventbrite.
Tripp Trapp, onzen Arwen had er al ene. Ons Mila wou er ene. Al een tijdje. Tot vandaag was het regelmatig: “Arwen, mag ik op uwe stoel zitten?
Ons Mila had/heeft zo’n childwood en dat is toch niet helemaal hetzelfde wanneer die kleine kindjes wat groter worden. Die zetten we nu terug opzij voor onze toekomstige spruit.
We zijn dan eens online gaan kijken en je kan toch al snel 30 euro besparen. Hier in een winkel betaal je rond de 165 euro. Bij Skandic hebben we 139 euro betaald. Geleverd. We zijn zelfs nog iets te vroeg geweest, want ze zijn weer goedkoper (130 euro, zie ik net).
Donderdag besteld, vandaag geleverd.
Zo zitten we weer. ;)

