Saturday 24 May 2014

#include "week1"



This week was mostly about getting acquainted with codebase and reflecting small changes while working on it.

Initially I wanted to add a column "language" to the existing posts model. I tried it many ways but failed initially. By declaring it as "xml_attr" worked but then I failed to assign value like "english" etc. due to validations . Then skipped validations by using .update_attribute and then it worked. Turns out that only existing attribute types from existing model can be declared.

This might work now but will certainly create issues in future as we don't need language as a xml attribute, so I didn't reflect any changes and searching for alternatives.

I decided to proceed similarly as the existing "/tags" field. Will add relevant js files and controllers in coming weeks.

I finally found out the template being used to display stream and comments. It's a format I am not very used to so still exploring how to exactly reflect changes.

I have created a new branch language_filter. I have added the model, spec and migration for language. One can either add model and use rake db:migrate or the existing application and run "rake db:seed" (this part should be done in both the cases) to add all the entries to the language table. Changes can be seen by opening the branch.

No comments:

Post a Comment