add action_button method to snippets.class