Archive for July, 2009

 

Recent Learnings

In the last few weeks I have done a few new things are work for the first time.

First off, I learned how to do file upload with rails. To do this, I used a plug in called paperclip. It was quite easy, and straight forward to use. I wouldn’t imagine about how to do it without such a plugin. What paperclip does, is it takes multiple pieces of information from the file, in my case it was an image, and saves them all separately, but allows you to refer to a single object instead of all of the individual pieces.

Besides file upload, I also learned how to do authtication with a CAS (Central Authentication System). It was quite easy as well. I used a plugin for doing this also. (It seems to be a trend lately, and also a very nice way to learn how to do something without banging your head against the wall) The plugin that I used was one written by my boss for doing exactuly what I needed to do.

Posted by crabtrgr on July 17th, 2009 No Comments

Its like a Glade (plug it in)

So, due to needed some specific functionality today (June 10th, yes I have been slow at getting this up), I made a plug-in for rails! The plug-in I made was quite simple, but it solved a great problem for me. What I needed, was a way to check if an object has any associated records, because we didn’t want to allow the deletion of it if it was associated with anything. So, I asked my boss about how to go about fixing this problem the easiest way, and he suggested that I write a plug-in, and away I went.

Now, being as I had never written a plug-in before, I did get a bit of help with it. So, my boss and one of my co-workers did a lot to help me with writing this plugin, but now that I have one down, if the need for another should arise, I have a much better understanding of how to go about it.

Well, I shall make the bloggers promise finally now, as most people assumed I would. I shall update my blog much more often than what has happened previously.

Also, if you want to take a look at the plug-in, and give me feedback, or have any ideas of how to expand it feel free. The plugin can be found here.

Posted by crabtrgr on July 6th, 2009 No Comments