haml

application.haml not rendering for any view in Rails 3

I've been able to get haml working for a few of my views just fine, but try as I may, I'm not able to get application.haml to render a layout. Right now I'm focusing on a very simple controller with one view (index). The view itself renders fine but none of the code within application.haml works. I've also tried renaming to applicatio...

Install HAML on IronRuby

Hi, installing Ruby standard libraries was just a matter of downloading them and setting library paths. ERB works fine. But now I like to give HAML (and SASS) a try. However I dont know how, cannot find a clean install? How can I install HAML on my IronRuby-setup? Thanks! ...

Rails Partial (Rails 3, HAML) arbitrarily slow

I'm using Rails 3.0.1, HAML 0.3.22, and Mongrel 1.1.5 (and MongoMapper not AR). I'm rendering a list, and each list item is it's own partial. Every time the page renders one of the list item partials takes almost 100X longer to render (and it is an arbitrarily different one each time. Also, needless to say, each item has essentially the ...

generating css file from new sass format (scss) with sinatra and haml

I am writing a sinatra app with haml and sass. When I try to link in the stylesheet with a scss extension located in my views folder I get the following error: NoMethodError at /nav.css undefined method `scss' Here is my get method get '/nav.css' do content_type 'text/css', :charset => 'utf-8' scss :nav end I have only gott...

Wordpress with Haml/Sass

Having used Haml and Sass for a few Rails side projects, I've found that they speed up my frontend development tremendously. However, I haven't found a Rails blogging platform that's as robust or familiar to clients as Wordpress, so that's still generally my go-to for projects that require a light website with basic CMS / blogging funct...

Escape / Ignore special characters in HAML attributes

I'm using HAML to make html templates but am having a problem in writing attributes which will be replaced with JavaScript string templating. The line in question looks like this: %div{:class => "<%= from_class %>"} HAML tries to encode the <%= %> tags: <div class="&lt;%= from_class %&gt;"> I don't want that to happen in this cas...

can't find/retrieve results from a specific table with datamapper

I am working on a sinatra app with datamapper connected to a mysql database and am having problems retrieving/finding records from only one specific table. I can insert into it with datamapper find but when I try to do @sleepEntries = Sleep_Log.all I get the following error: ArgumentError: argument out of range. When I load everything in...

HAML's eating the white space can be "%span><=", but not "><="?

I have used %span><= and it can eat up the white space between this line and the next, and also outside of the span tag, but it seems like an element needs to be used. The form ><= or <= or >= can't be used to eat the space. Or is there some ways to make them work? some docs at: http://haml-lang.com/docs/yardoc/file.HA...

Generating unique HTML ids in Rails when using a repeated partial that has form_for

I have a view on my current project which does something like the following(in haml): [email protected] do |horse| = render :partial => 'main/votingbox', :locals => {:horse => horse} The in the _votingbox.html.haml file I have the following: %div.votingbox %span.name= horse.name %div.genders - if horse.male %img{:src => '...