Skip to main content

Posts

Showing posts from April, 2015

Add handlebar helpers in ember cli project

Updated for ember-cli 1.13.8 To add handlebar helper, create file under 'app/helpers/' directory If your helper name is 'if-first' than your file will be like 'app/helpers/if-first.js' Remember to use dash in helper name so that it will be loaded automatically, for more info read  http://www.ember-cli.com/#resolving-handlebars-helpers . Example: Check for first element in each loop. 'app/helpers/if-first.js' import Ember from "ember" export default Ember.Helper.helper(function(options)  {  if(options[0] === 0){     return options[1];   }else{     return options[2];   } };     then use it in your handlebars template {{#each items as |item index|}}   <div class={{if-first index "active item" "item"}}>            </div> {{/each}}   You can also pass  parameter to helpers like:  {{#format-date date}}  and collect parameter:  export default Ember.Helper.helper(functi

Letter To Ruby Conf India Organisers

Disclaimer : This article consist of my brutally honest review about Ruby Conf India 2015, If you are prone to depression, heart attack while reading criticism, please STOP reading this letter now  and move on. I know organizers worked hard to organize this event and I thank you for that but this does not mean I am happy with the way it was organised. I have complaints, so do lots of people I know. Someone has to raise voice, for now I am taking this responsibility. 1. Why Discriminate ? I was given accommodation in Justa-panjim while most of the conf attendees were in Cidade-goa, those two hotel are incomparable. Justa-panjim didn't have enough water for bathing, forget about swimming pool, beach. I didn't had complained if everyone was given accommodation in Justa-panjim, Yes I am being jealous here..!!! I paid conf fees(lite tickets.. yes thats how early I booked my ticket.) and I deserve to be treated equally , why discriminate ? 2. Where's Ruby ? In some o