How to get haml support in netbeans 6.9

By default netbeans 6.9 is not providing the support for haml. We need to download the netbeans haml plugin and add to your netbeans.
Download the haml plugin from here:
http://postcomment.googlecode.com/files/org-netbeans-modules-haml.nbm

then go to your netbeans Tools/plugins/ and go to Downloaded tab, click on add plugin select the drop down and give your downloaded plugin path. Click on ‘OK’ button. Click on ‘Install’. Thats it!

Advertisements

A Simple example of Using iframe in Rails

Write the code for iframe and in the src option give the path that defined in routes. It will render the file which corresponding action of the controller renders.

An Haml example is given below:

%iframe{:align => "center", :name => "window", :src => "#{list_make_shipments_path(:ids => "#{@shipment_success_responses.collect(&:id).join(",")}")}", :height => "1000px;", :width => "1100px;", :style => "float:left;margin-top:30px;"}

Create an Image from base64 encrypted image digest data

Suppose you have a base64 digest data of an image, how are you going to display it in your website?

For example You an encrypted image data like this : PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9JRVRGLy9EVEQgSFR…

Here is an example in haml, how to display the image from this data ( you can make corresponding HTML from this if you are using a Html file)


%img{:alt => "File Icon", :src => "data:image/gif;base64,PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9JRVRGLy9EVEQgSFR...", :style => "float: left;margin-top:200px;", :id => "my_image_id", :class =>"blahblahblah"}