jacopo beschi: yet another web guy

Posts Archive

Ruby: Dynamically create callbacks with metaprogramming

Created at: Jun/12/2015 jacopo beschi

Hello guys, in this post I'll explain you how you can handle callbacks with metaprogramming on ruby on rails. But before going deeper into detail you should ask me the reason of that: why shall you use callbacks instead of using general oop techniques? For example in a classic oop design given that you have:

Class X
   def method_x(*args)
      #do something
Read on

Ever heard of Fire...Base?

Created at: May/26/2015 jacopo beschi

FireBase is a service that offer you a json rest api, authentication and storage in cloud; pretty cool isn't it? It's also integrated with all the famous Javascript libraries and even more, now is part of the google team! What can i use firebase for?

Read on

Testing for custom Rails validators with Rspec and metaprogramming

Created at: Apr/25/2015 jacopo beschi

Hello guys, some days ago I've made a custom validator for Rails and I wanted to test that it was used correctly in my model (which uses ActiveModel::Model). As a brief preface you have to know that to test for the common Rails validators you can use the shoulda matchers library.

Read on

Devise remote authentication with rails 4.2

Created at: Apr/08/2015 jacopo beschi

Hello guys, I've been trying to make remote authentication working with devise and i found this useful post: devise remote authentication. The problem is that the post example wasn't working correctly with new devise versions (3.4.x); In this post I'll explain you the changes that you need to do to make it work with devise 3.4.

Read on

Dash all'in one documentation tool

Created at: Mar/10/2015 jacopo beschi

Hello guys, looking around in the web i found a cool tool: dash. This tool allow you to have the documentation of many language and framework always updated and in the same tool. You should definatelly take a look at it. That's all for today, have a nice time!

Read on