similar to: comments on HAML ?

Displaying 20 results from an estimated 2000 matches similar to: "comments on HAML ?"

2010 Sep 07
2
Help on formatting some HAML
I wondered if anyone could help me with turning the following in ERB into HAML. I''m VERY new with HAML: ---- <div class="block-element span-7 colborder"> <span class="rightside blue-hue no_decor"><%= link_to "New Order", new_order_path, :remote => true %></span> <h3>Today''s Activity</h3> <hr>
2009 Apr 14
6
About haml and ruby on rail
hi all, I am converting my view into HAML format i have done it with "Html2Haml" command, then I removed all the "- end" from haml code and my indentation is also correct,but now it shows following errors I have kept code of show.html.erb and show.html.haml in attachment. please help me I am not getting what exactly the error is? compile error
2010 Jun 16
2
class methods from module where active rec is involved
I have a module as shown below and when I extend an active record to use it, I can not access the primary_key method. In a simple test program using a similar approach where active record is not involved, access to the class methods seems to work ok. What can I do to make this work or so that I can access the class methods ? ################################## require
2008 Feb 15
2
HAML question - conditional multiple classes on a div
I am looking into HAML and am trying to convert one of my ERB templates to see what I think of it. Everything was going pretty well until I got to the following snippet: <div class="<%= t.done ? "task done": "task" %>"> <p class="title"><%= h(t.description)%></p> </div> How would you do this in HAML? (I know how to
2008 Aug 25
3
haml says yes, rails says no
I''m using the haml gem and it''s great, been using it for a while and I love it. I''ve got a problem trying to display the flash messages, if I do the following: - if flash[:notice] #flashNotice =flash[:notice] - else if flash[:error] #flashError =flash[:error] - end I get You don''t need to use "- end"
2011 Mar 02
3
haml to erb - does it work with new html5 tags?
Hi, I wanted to covert all my erb over to haml, but I use HTML5 tags like nav, section, article, etc. Any idea if this is supported by haml? Checked out their site, nothing mentioned there or did I miss something. Sorry noob here. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2012 Jan 15
2
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. (rspec + haml)
I upgraded a small project that I had created on 3.1.3 to 3.2.0.rc2. Running rspec on it brings about a large amount of these messages: DEPRECATION WARNING: Passing a template handler in the template name is deprecated. You can simply remove the handler name or pass render :handlers => [:haml] instead. (called from block (2 levels) in <top (required)> at
2008 Jan 19
5
HAML makes me love and hate Python
I''m just a rails newbie, but I thought I would point out a small observation. About a year ago, I was having real trouble making the decision about whether I should learn Ruby or Python. I finally settled on Ruby, one of the reasons being that I didn''t want my language to tell me how whitespace should work. (Although the main reason was how object oriented Ruby is) Although
2009 Sep 27
4
Haml & Sass
I would like to use Haml for pages (and possibly templates) and Sass for CSS. But I am a webgen newbie and can''t figure out the configuration. Is such a configuration possible? Could someone help me set it up?
2010 Dec 21
5
Rails, Ruby, haml, metaprogramming problem
In HAML I have hundreds of lines like the following: - xyz = someFuncThatReturnsString(''xyz'') and elsewhere %div{''id'' => xyz} The above lines work fine. - - - Attempting to keep things DRY (Don''t repeat yourself) I want to do something like - eval(otherFuncThatReturnsString(''xyz'')) where
2008 Jun 15
2
Create haml files with rspec_controller command?
It is a nuisance to have to rename all of your files from .erb to .haml. Is there a quick way around this? -- Posted via http://www.ruby-forum.com/.
2010 Jul 07
4
Haml ... ending a line with a | (vertical bar)
I don''t know if HAML questions are appropriate here ... but here goes. How does on end line to be rendered with a vertical bar (|) ? The vertical bar is a line continuation, aparently. Doing \| cause the vertical bar to be emitted ... as well as the backslash. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups
2006 Apr 01
15
Ruby on Rails CMS released. Web 2.0, Ajax, etc
Eribium, a content managing system built with rails has been released completely free under the MIT License. http://www.eribium.org/eribium/?p=21 You can find a demo here: http://alexmaccaw.no-ip.info:3000/admin (user and pass are ''demo''). Some of the features include: * Completely Unobtrusive Javascript. * Liquid View, works with pretty much any screen resolution.
2011 Jun 08
4
Cannot modify SafeBuffer in place
Upgraded from rails 3.0.7.rc1 to 3.0.8 today and ran into a problem when rendering haml: TypeError in Pages#home Cannot modify SafeBuffer in place Full Trace: activesupport (3.0.8) lib/active_support/core_ext/string/output_safety.rb:122:in `gsub!'' haml (3.1.1) lib/haml/compiler.rb:382:in `block in build_attributes'' haml (3.1.1) lib/haml/compiler.rb:358:in `each'' haml
2010 Mar 30
0
using haml in internationalisation with haml views
I''m trying to use haml in my locale files but cant get it to parse. en.yml --------- page: content: " %p some paragraph %p another paragraph " view.html.haml ------------------- (works) =Haml::Engine.new(t(''page.content)).render -------------------(does not) =t(''page.content) is the first example the only way to do this? or am I going about
2011 May 25
1
can't load hpricot gem in rails 3
This is in windows .. So from irb, I can load hpricot ok. (ruby 1.8.7) C:\Users\Laurence\rails-play\plug-test>irb irb(main):001:0> require ''hpricot'' LoadError: no such file to load -- hpricot from (irb):1:in `require'' from (irb):1 irb(main):002:0> require ''rubygems'' => true irb(main):003:0> require
2010 Aug 19
0
Camping 2.1 - ERB, Haml, 1.9, bug fixes, new website!
{} || || ~~~~~~~~~~~~~~~ <= _whycake ~ Camping 2.1 ~ ~~~~~~~~~~~~~~~ I''m pleased to announce another release of Camping, the microframework. This time we''ve focused on improving the 1.9 support, adding (builtin) support for more template engines, refreshing the homepage and just general bug fixes. gem install camping Home:
2007 Jul 06
3
stubbing helper methods for View specs
Hi there I have several view specs, that include the following snippet in their "before" block to stub the methods by acts_as_authenticated before :each do @u = mock_model(User) @u.should_receive(:name).and_return("Hans Muster") template.should_receive(:logged_in?).and_return(true) template.should_receive(:current_user).and_return(@u) end this
2006 May 16
2
liquid: passing objects
I''ve got Liquid installed and maybe since I''m not coming in with Django experience, I''m completely mystified by how to pass anything worthwhile to a template. In my controller: def preview @customer = Customer.find(1) @letter = Letter.find(1) @liquid_body = Liquid::Template.parse(@letter.body) @x =
2008 Jul 03
0
Testing HAML in helper rspec
Thought I''d post this under its own heading so others can find it. Thanks to David for the pointers to solve this. Here is the incantation needed to use HAML 2.0 under RSpec 1.1.5 (Needs the .5 for a fix) # application_helper_spec.rb under spec/helpers ... before :each do helper.extend Haml helper.extend Haml::Helpers helper.send :init_haml_helpers end it