Dynamic Conditions for Associations in Rails 3
If you are using dynamic conditions in Rails 3, like Time.now or 1.week.ago you should use a Proc for that condition. ...
If you are using dynamic conditions in Rails 3, like Time.now or 1.week.ago you should use a Proc for that condition. ...
If you are developing an API with Rails you need to rescue from the errors produced by a bad formatted JSON. In order to do that I use a middleware file placed in app/middleware named ParamsParserRescue.rb. ...
I’d like to share some sites with programming challenges, also known as programming puzzles. I find them very useful to learn a new language, much more than reading a lot of books. Actually, I usually read one book for beginners of the language and after that I go to one of the following sites and start to code. My favourite is /r/dailyprogrammer. /r/DailyProgrammer. Subreddit with three challenges every week or so (easy, intermediate and hard). Project Euler. Math problems, created to be solved with a program. Code Forces. More problems! Code Golf. Part of the Stack Exchange platform. Very focus on the number of lines, but that makes it more fun. Coding Bat. Most of the problems here are easy, and some of them include the solutions. /r/ProgrammingChallenges. Another subreddit, less organized. Extra: a post with more links to challenges. Enjoy! ...
REST is a style of software architecture, often used in web. The design of Rails, for instance, is based a lot on REST. The idea behind this architecture is to have very similar interfaces to access all the resources in your system. Recently I had to create 2 APIs in 3 months so I had to learn all I could in a very short time. I’d like to share some conclusions but giving the fact that to develop an API people usually say you need 10 years of experience take them with caution. ...
If you have worked with Subversion and iOS you are probably aware of this problem. Whenever you are going to do something with a file that has an at sign in its name you can’t. For instance imagine you’ve just added a file for retina and try to add it to the repository (XCode can do this too): $ svn add [email protected] The message from Subversion will be: Skipped [email protected] That’s because Subversion uses the @ for other purposes. ...