haml

How can I keep a div's scrollbar at the bottom of the div using jQuery?

I have a div called #output, styled with overflow: scroll;. Using jQuery.ajax, it's being updated every x second. I'd like to have it so that when the scrollbar appears (after the divs filled up), it should continously stay at the bottom of the div instead of the top, like most chat clients do. I'm sure there's a way to do this, I just ...

Ruby wont recognize Haml under ubuntu64 while using jekyll static blog generator.

I have been trying, quite unsuccessfully, to run henrik's fork of the jekyll static blog generator on ubuntu 64 bit. I just can't seem to figure this out and I've tried a bunch of different things. Thanks!! The base stats of my machine: Ubuntu 9.04, 64 bit, ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux], rubygems 1.3.1. When I ...

HAML Inheritance

I am new to haml and want to do some inheritance, but I don't know whether it is possible with haml or not. I have 2 separate haml files as below === file1.haml %p This is haml1 === file2.haml %h1 This is haml2 *** I want to have a file.haml which inherit from file1.haml and file2.haml. Is it possible to do it with haml? ...

ActionView::MissingTemplate with HAML

I'm getting Ruby on Rails set up on a fresh installation of Snow Leopard. After battling (and beating) MySQL and Sphinx problems, I'm stuck on a stupid error related to HAML. Essentially I'm getting a missing template error for every view that uses HAML. I can add a blank xxx.html.erb file and and a (blank) page loads fine. But xxx.html...

=button_to does not generates form if already in an other form

Using the same form partial in both create and edit in my case new and preview. partial looks somewhat like this (I use HAML) =form_tag ({:action => params[:action]}, :multipart => true) =text_field :newsletter, :title =text_area :newsletter, :body =file_field :newsletter,:attachment -if params[:action] == "preview" =butto...

[HAML] if else error

This is my code. I have a problem with spaces. I can not get the proper generation - if @lastday.nil? && @lastday != item.created_at.strftime("%d %b %Y") .daily-entry %h1.date =h item.created_at.strftime("%d") %span =h item.created_at.strftime("%b, %Y") -else .entry %h1 = link_to item.title, "/i...

Even better support for HAML in Netbeans?

This plugin is pretty good, definitely better than plain-text.. but I'm longing for a little more. Code completion, the Netbeans code generator shortcuts, 'ri' integration for looking up documentation like the .erb files have.. Does anyone have some tricks, is there a different plugin for this type of functionality in Netbeans? Definit...

Using Haml & Sass with Eclipse

Are there any plugins for eclipse that add syntax highlighting and other niceties for editing Haml and Sass? Google searches only seem to point to a dead project on lucky-dip.net. Note: it's Sass I'm most interested in. A solution for using just Sass (or something similar to it like less) in Eclipse would suit my needs. Also, I'm devel...

Multiple multi-line HAML blocks

Using the (intentionally) strange multi-line format for HAML, I'd like to have the following lines in my template: = call_to_helper :foo1 => 'bar1', :foo2 => 'bar2', :foo3 => 'bar3', | :foo4 => 'bar4', :foo5 => 'bar5' | -# and = call_to_helper :foo1 => 'bar1', :foo2 => 'bar2', :foo3 => 'bar3', | :foo4 => 'bar4', :foo5 => 'bar5' | ...

HAML throwing exception on Production but not Development

I've written this HAML: %script{:src => "http://www.google.com/jsapi?key=mykey" :type => "text/javascript"} Note the missing comma between :src and :type. On my Production server (Dreamhost/Linux), I get the following logged exception when I try to view the page: ActionView::TemplateError (compile error /home/.kuce/sugarthrill_stage...

Is it possible to have Haml indent HTML generated by a view helper in Rails?

Say I have a things resource with a view helper method such as: module ThingsHelper def foo ret = "" 3.times { ret += content_tag(:li, "foo") } content_tag(:ul, ret) end end This, then, is used in a template: %p = foo The HTML source that's generated looks like this: <!DOCTYPE html> <html> <head> <tit...

Using webrat's contain(text) matcher with haml

I'm using the following webrat matcher: response.should contain(text) With the following haml: %p You have = current_user.credits credits I've written the cucumber step 'Then I should see "You have 10 credits"', which uses the webrat matcher above. The step fails, webrat does not find the text in the response because the ham...

Load jQuery through Google API in Rails using HAML?

This feels like it should be pretty simple, but not much seems to be loading. I have this in my app/views/layouts/application.html.haml: = javascript_include_tag 'http://www.google.com/jsapi' %script{ :type => "text/javascript", :charset => "utf-8" } //<![CDATA[ google.load("jquery", "1.3.2"); google.load("jqueryui", "1.7.2"); ...

HAML & RoR: Auto-convert apostrophes, etc., to ASCII HTML entities?

Is there anyway to have HAML automatically convert all my apostrophe's ' to the HTML character entity equivalents (&rsquo;)? Ditto with all the other characters that one would want to convert (dashes, double-quotes, etc.) for better online readability. ? ...

I have a problem in linking a stand with two checkboxes owner communication and resident communication.

I have a problem in trying to link a stand with two checkboxes which are resident & communication, and they seem to be stored separately if more than one stand is choosen. If I have one stand the parameters seem to be stored in the correct manner inside a hash of an array, but once I add another stand to that same array it seems to swap...

What is the proper way of handling xml-stylesheet :xmlns:blah with haml?

I'm trying to hook up a blog with some xml namespaces and xml stylesheets. The ugly way that I'm doing this currently looks like so: !!! XML = partial('xmlstyle') %channel ......blah..... = partial('xmlend') where _xmlstyle.xml.erb looks like: <?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?> <?xml-st...

Help with Sass mixin & variables (var is being ignored)

Hi guys, I have the following mixin in a sass partial: =card-list width: 180px min-height: 150px display: -moz-inline-stack display: inline-block vertical-align: top margin: 5px zoom: 1 *display: inline _height: 250px -moz-border-radius: 10px -webkit-border-radius: 10px Now, when I tried to make it parameterized ...

How to send back js.haml in rails

I have a rails create action which send back some jquery in a file: create.js.erb var appearance = $("<%= escape_javascript(render(:partial => @appearance)) %>").effect("highlight", {color: '#E6ff00'}, 2000); $("#sortable").append(appearance); $("#new_appearance")[0].reset(); I have started using HAML and want to know how I should be...

SASS syntax highlighting does not work when bundle is installed along with HAML's in Textmate?

I've encountered this issue on two different machines and can't figure out what the cause is. SASS syntax highlighting works fine in TextMate when I install a SASS bundle like this. However, when I also install a HAML bundle, like this one, SASS code reverts to plain text color. I've tried a bunch of different combinations of bundles o...

haml editing on gEdit, any way to auto indent?

I'm using gEdit to edit haml files and the auto indenting feature seems to work when i'm writing one line after another, but when I go and clear out a exisiting element (a div or a class) the rest of the code below doesn't adjust itself. Suppose this is my code .rightside .container %ul %li hello %li world Now is the...