Displaying 20 results from an estimated 198 matches for "haml".
Did you mean:
hal
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...
2010 Jul 19
16
Strange Error undefined method `show' for # see no way to debug, suggestions?
...d )
now i get an error which I cannot seem to debug point my finger on.
I have a home controller which just displays a welcome page this had a
index only action.
Whatever controller I try to open i always get above error message
ActionView::TemplateError (undefined method `show'' for
#<Haml::Precompiler::Line:0x10547ef40>) in app/views/home/
index.html.haml:
haml (3.0.9) [v] lib/haml/precompiler.rb:178:in `precompile''
haml (3.0.9) [v] lib/haml/engine.rb:121:in `initialize''
haml (3.0.9) [v] rails/./lib/haml/template/plugin.rb:29:in `new''
h...
2007 Jul 06
3
stubbing helper methods for View specs
...ogged_in?).and_return(true)
template.should_receive(:current_user).and_return(@u)
end
this works for views / helpers like this:
it "should show bla" do
render "/layouts/thetool"
response.should have_tag("p", "bla")
end
and the view (haml to make things more interesting)
- if logged_in?
%p bla
Now I also use Ezra acl_system2 plugin which defines a "restrict_to"
method that queries some roles. When I stub the methods above and run
specs, I get the following error:
ActionView::TemplateError in ''/user...
2007 Aug 29
11
Non-Erubis Templates
Trunk Issue: Because of the use of ''autoload'', template handlers other
than Erubis are not loaded automatically (Haml, XMLBuilder). Either
this should be fixed, or the documentation should be updated to
instruct people how to use non-Erb template engines.
Apparently the solution is to do something like this in merb_init.rb:
::Merb::AbstractController.register_engine ::Merb::Template::Haml, %w[ haml ]
So the q...
2011 Oct 29
2
comments on HAML ?
I have been asked a couple of times at job interviews if I am
familiar with HAML or Liquid so I was wondering if maybe I should
start using them and perhaps it would make the views easier to work
with.
If I install HAML on a machine where my app is that has alot of
regular HTML in the .erb views already, will it still work with those
or do I need to convert everything to HAML...
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" grou...
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 Nov 22
0
Something wrong after upgraded to puppet-dashboard 1.04
...t return a "We''re sorry, but something went wrong." to me. Checking
the log, i got something as follows:
ActionView::TemplateError (undefined method `<=>'' for #<NodeGroup id:
5, name:"Web_Marketing">) on line #10 of app/views/shared/_g
roups.html.haml:
21 7: %th Group
22 8: %th Source
23 9: %tbody
24 10: - resource.node_groups_with_sources.sort.each do |
group,sources|
25 11: %tr
26 12: %td
27 13: %strong= link_to(group.name,group)
28
29 app/views/shared/...
2013 Mar 07
2
Puppet Dashboard changed reports view error
...odes", :action=>"show"} - you may have ambiguous routes,
or you may need to supply additional parameters for this route.
content_url has the following required parameters: ["nodes", :id] - are
they all satisfied?) on line #35 of
app/views/reports/_reports_table.html.haml:
32: %td= link_to h(report.time), report
33: - unless node
34: %td= link_to_if report.node, h(report.host),
node_path(report.node)
35: %td= report.total_resources.to_i
36: %td= report.failed_resources.to_i
37: %td= report.changed_resour...
2008 May 26
5
Noob SASS error (permission denied)
I just created the sass directory in my stylesheets directory and
when
I reload my page I get this error:
Status: 500 Internal Server Error
Permission denied - /Users/Justin/kicksite/trunk/public/
stylesheets/
application.css
/usr/local/lib/ruby/gems/1.8/gems/haml-2.0.0/lib/sass/plugin.rb:
72:in `initialize''
/usr/local/lib/ruby/gems/1.8/gems/haml-2.0.0/lib/sass/plugin.rb:
72:in `open''
/usr/local/lib/ruby/gems/1.8/gems/haml-2.0.0/lib/sass/plugin.rb:
72:in `update_stylesheets''
/usr/local/lib/ruby/gems/1.8/gems/haml-2.0.0/...
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...
2007 Nov 20
3
How to test views with Nested Resources and Partials
...to a wall in testing my
views. I have a RESTful resource Contracts with a nested resource of
Line_items.
I am trying to figure out how to test the "edit" form of the Line_items.
What complicates this is the nested routing and how to account for it,
and that there is a partial form (_form.haml) that both the edit.haml
and new.haml views use (app/views/line_items).
My spec keeps failing and it seems to be from a routing issue. I''m
pretty sure template.expect_render/template.stub_render should be in
there somewhere, but that just generates more errors.
I am running edge rails an...
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)...
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
/home/peterv/data/backed_up/projects/code/contact_app/spec/views/contacts/new.html.haml_spec.rb:12)
.
The offending code seems to be:
spec/views/contacts$ cat -n new.html.haml_spec.rb
1 require ''spec_helper'...
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<...
2008 Jul 21
6
form_for and select ( => f.select)
Hi All
I''m trying to combine the from_for and select helpers
Right now I have
form_for :service, :url => ...... do |f|
select("abc", "xyz_id", @my_arr.collect {|item| [ item, "bla" ] },
{:prompt => "opt1"} )
....
end
What I want to do is something like
....
f.select("abc", "xyz_id", @my_arr.collect {|item|
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...
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[:err...
2008 Jan 19
5
HAML makes me love and hate Python
...n 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 I''ve never really used Python, I now love it with all my
heart thanks to HAML, lol. The whole whitespace thing is amazing in
HAML. It is infinitely superior to regular HTML. It''s so much cleaner,
easier to read, easy to write. It''s just amazing. I can''t believe I
actually have to write "end" after all of my Ruby blocks. I''m almos...
2010 Aug 19
0
Camping 2.1 - ERB, Haml, 1.9, bug fixes, new website!
...refreshing the homepage and just general bug fixes.
gem install camping
Home: http://camping.rubyforge.org/
Code: http://github.com/camping/camping
Bugs: http://github.com/camping/camping/issues
List: http://rubyforge.org/mailman/listinfo/camping-list
Let''s have a look:
~> ERB and Haml
Camping now includes support for Tilt (http://github.com/rtomayko/tilt) which
means that you''ll get simple, effortless ERB and Haml support:
module App
# Path to where you want to store the templates
set :views, File.dirname(__FILE__) + ''/views''
end
modul...