the line
rails new someapp -m haml
doesn't work. It seems to need a path to some where.
Update: haml-rails is in fact installed by gem install haml-rails but the line above wouldn't work.
...
How do I create this:
<p>
I would like to make a <a href="foo.html">link</a> in my Rails app.
</p>
with HAML?
...
Once again, having trouble installing Compass, like here only different.
My versions and error:
$ cat /etc/issue
Ubuntu 10.04.1 LTS \n \l
$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
$ compass -v
Compass 0.8.17 [2465bab]
Copyright (c) 2008-2009 Chris Eppstein
Released under the MIT License.
$ haml -v
Haml/Sass 3.0.18 (...
I have the HAML TextMate bundle and inside of the :javascript block, I'd like to have proper javascript syntax highlighting. How could I modify the HAML bundle to do this?
...
I am in the process of deploying a Rails application (that works fine in development) to a new production server running Apache and Passenger. When I navigate to the main page, I get the following in my production.log (along with a 500 Internal Server Error from Apache):
ActionView::TemplateError (uninitialized constant Haml::Filters::M...
Hi
Since migrating a project to rails 3, haml errors are not very descriptive..
All we're getting in the logs is a generic nil object error.
For instance in rails 2.3.8 when the indentation in a haml file was incorrect we'd get an error message pointing to the file and approx line.
However now in rails 3 we just get
NoMethodError (Y...
I'm using Haml in rails and have been writting with the :markdown filter (bluecloth gem), but a piece of example code is in ruby and the page tries to execute the #{values}, how can I stop this?
Here is the breaking bit of code:
:markdown
like_frags = [fields].flatten.map { |f| "LOWER(#{f}) LIKE :word#{count}" }
or_frags << "(#{l...
I have an input field that was written with onfocus="this.value='' , but recently decided to change it to onfocus="this.select() . The trouble is that when I went to change it, it still clears! I searched my entire javascript library, html, everything looking for what could be causing that. Nothing is being called of the likes.
I tried ...
Hello, I'm quite new to Ruby language (up to now I developed in Groovy + Grails) but since I was curious about it I wanted to try Sinatra on Ruby 1.9.2-p0.
I have a trivial website that is contained in /mywebpage and has 2 files:
# blog.rb
get '/' do
'Hello World!'
end
get '/impossible' do
haml :index
end
and
#config.ru
path = ...
in ruby you can do conditional block like so
block do |n|
puts n
end if foo == bar
which would translate into erb as
<% block do |n| %>
<%= n %>
<% end if foo == bar %>
is there a way to achieve this in haml other than wrapping the block in a condition?
...
I'm using formtastic and haml on a Rails 3 application. I'm trying to make a nested form for surveys and questions, but it's just not working for me. I've watched the railscast and on it and everything, but I can't seem to make it work for my application. So right now, I have the following:
models
class Survey < ActiveRecord::Base
at...
Hi All,
I am a PHP dev trying to start using HAML, using this implementation:
http://phphaml.sourceforge.net/
HAML looks awesome, but I don't understand if/how it supports partials (or includes, as they are called in the PHP world).
I would like to have a master template HAML file that then goes and loads up a bunch of partials for al...
In html, you can do something like this
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent eget
aliquet odio. Fusce id quam eu augue sollicitudin imperdiet eu ac eros.
<em>Etiam nec nisi lorem</em>, ac venenatis ipsum. In sollicitudin,
lectus eget varius tincidunt, felis sapien porta eros, non
pellentesq...
app/views/layouts/shared.html.haml:
= render :partial => "shared/head"
= yield
= render :partial => "shared/footer"
app/views/shared/_head.html.haml:
!!!XML
!!!1.1
%html{"xml:lang" => "pl", :xmlns => "http://www.w3.org/1999/xhtml"}
%head
%title
some title
%body
.container
app/views/shared/index.html.ham...
Hi,
I've an element TR in my view, I want to add classes dynamically on this element depending on an association between 2 models (many to many between company and packaging).
The result should looks like
<tr class="pck1 pck3 pck5">
where pck1, pck3 and pck5 are packaging associated with a company
Thanks for your insights
...
Hey there,
i have tried to render some files with HAML in Rails 3. But HAMl doesn`t work.
My testfiles have the extension .html.haml.
In the GEMFile i have written gem 'haml' and executed the bundle install
When i call my testapp i become an error like this:
Template is missing
Missing template posts/index with {:locale=>[:en, :en], :...
So I'm trying to get a remove link next to the caption in an emails form. However, my rails voodoo is clearly very weak. It escapes the HTML and I can't figure out how to get it to not. Any hints?
= f.input :email, :label => "Email " + link_to_remove_fields("[x]", f)
[edit] oh and yes, this does the same thing:
= f.input :email, :lab...
I have a model, called delivery:
property :id, Serial
property :created_at, DateTime
property :updated_at, DateTime
property :price, BigDecimal, :precision => 10, :scale => 2
Delivery has a price, which when viewed in SQLite is values such as 5.49, 6.95, 4.95
When displaying this information in the output (coded in ...
I want to write a parser and converter of haml-like languages, to parse them, and convert them into html content.
I found people usually use regular-expression to do this, but we have to write a lot of difficult regular expressions, which is not easy. Is there any tools or libraries to do it? I hope it in java and easy to use.
And, is ...
I want to use haml in rails 3 project.
Now how to start?
How to cofig it?
...