devblog of @sgt_mactavish
Tightening controller test
Problem One day i saw a snippet of code inside controller test, which is green and sadly is a little hard to understand:
Elixir Functional Form
I am still exploring Elixir anonymous function, let’s move on to another interesting feature. Like javascript or functional programming language, in Elixir we can writes function that takes one or more functions as an input and or returns a function,
Elixir Anonymous Function
In Elixir we can create anonymous function like in javascript, use fn keyword to define an anonymous function.
Elixir Pattern Matching
In Elixir pattern matching can be done using = operator, the equal sign compares left-hand side variable with right-hand side variable, it’s success if both are equal. Lets see simple example:
Extra '\n' inside rails mailer template
When i work with the email stuff, i accidentally found problem when email template was already sent by Mandrill SMTP. For example in my apps there is a feature to reset password, which is of course inside the email contains reset password link.