Possible to "watch" both HAML and SASS at the same time?
I'd like to be able to update/save both my html and css on-the-fly, but I can't figure out how to watch both HAML and SASS at the same time. Thanks! ...
I'd like to be able to update/save both my html and css on-the-fly, but I can't figure out how to watch both HAML and SASS at the same time. Thanks! ...
Hi guys, I've started using HAML, and everything rocks except that I cannot get my old helper shortcuts in TextMate when creating HAML templates. I've installed the HAML bundle, but it doesn't seem to support those shortcuts (like rp => render :partial). Is there any way out of this? Thanks a lot. ...
When using Ruby on Rails or other framework, a lot of time we generate <span> or <img> in a loop, and each line will be on a new line. So when it is rendered in HTML, there will be extra space between those inline elements. How can it be solved? Must they be made into 1 long line, or solvable using HTML or CSS? ...
HAML: = link_to 'redeem', redeem_admin_organization_path(organization), :class => 'button_short live redeem' Controller: def redeem @organization = Organization.find(params[:id]) @organization.update_attribute('accumulated_credits', '0') end redeem.js.haml: == $("#organization_#{@organization.id} .redeem").html("#{escape_javas...
To generate <span> or inline elements using a loop, so that the result has no white space between them: %div - 5.times do %span> hello the above will create <div><span>hello</span><span>hello</span><span>hello</span><span>hello</span><span>hello</span></div> (practically, it is no use to stick "hello" together, but say, if we...
I keep getting an error like this: Sass::SyntaxError: Properties aren't allowed at the root of a document. on line 2 of /Users/eumir/rails_apps/neo2/public/stylesheets/sass/ main.sass main.sass's line 2 starts with @import mixins I have a _mixins.sass which has a variable declaration on line 2: $alt_site_color: #060 $main_s...
Following the guide at http://github.com/fortuity/rails3-mongoid-devise I've managed to setup Rails3 with Haml, Devise, and Mongoid. (As a side-note, the guide is really detailed; recommended reading for new Rails users!) Only problem is I can't get Rails to render my Haml views: Started GET "/" for 127.0.0.1 at 2010-07-01 14:40:23 +02...
I have metal working (thanks to Railscasts), but I have a haml template that I want to render instead of just plain text. Apparently you can render ERB , but I don't see any place to do the same with haml. Is it possible or will I just have to live with using the plain rails routing if I want to continue using haml? Thanks! ...
Hi there I've just started with Rails (having previously worked in Django). The hardest part is working out how to use haml. I have found the official haml documentation. However, there seems to be no coverage here of syntax - if/else clauses, for loops, etc. Other than Googling for examples, is there any official documentation of sy...
In haml, how do I render the following incredibly basic HTML: <p>Results found for <strong>search term</strong> where 'search term' is actually a Ruby variable called @query? I'm trying the following, %p results found for <strong>= @query</strong> But that renders = @query literally. If I try: %p results found for <strong> = @qu...
I'm trying to make a simple room management service. The rooms have these properties: class Room include DataMapper::Resource validates_is_unique :number property :id, Serial property :number, Integer property :guest, String property :status, Enum[ :free, :occupied ], :default => :free end Then I create a new room like th...
When I insert a new text_area input(created by rails) into an existing form with jQuery it doesn't allow the user to type in the box, but the text_field(also created by rails) input field does. -form_tag user_posts_path do [email protected]_with_index do |post,index| -semantic_fields_for "posts[#{index}]", post do |f| =re...
I am trying to write this : %meta{ :name => "keywords", :content => "#{@page_city}, #{truncate_words(@page_keywords, 7) || 'Meta, Words, Are, Dope, For, SEO'}"} Basically it sees if there is a local page that has a page city or keywords and adds those as they meta keywords. If it doesn't, it says the latter. This works, but the onl...
Here's my javascript: $(".more_info").hide(); $(".checkbox.has_info, .has_info").focus(function(){ $(this).parent().next().next().show("fast"); }); $(".checkbox.has_info, .has_info").blur(function(){ $(this).parent().next().next().hide("fast"); }); Note, that this works perfectly in Firefox/ IE7, IE8. So far I have discovered th...
I'm trying to create a cpan module that integrates Text::Haml into Template Toolkit. I think that Haml is an interesting templating language but rather limited, it doesn't support loops or conditionals let alone more advanced things. But I can't seem to get eve a very simple version to work. The following are some test scripts that work ...
SASS is not creating the CSS files, but HAML is working just fine. I ran the following command: $: sass --watch scss:stylesheets [true, ["scss", "stylesheets"]] My main.scss file contains the following: /* main.scss */ body { background: #000000; } The main.css file never gets generated. So I ran the following: $: sass --upd...
I'm editing haml in eclipse, but it has no highlight. I don't want to use "radrails" plugin of eclipse just for this(it's too huge) I found a plugin named EclipseColorer, looks nice but doesn't work on windows. I hope there is a plugin like that can work on windows, but not found. Is there any plugin can highlight haml in eclipse? Than...
It doesn't seem to be any HAML and SASS support in Netbeans 6.9. Is there a way to add this support? Thanks ...
First: Sorry for the ambiguous question, I'm not fully versed on Rails parlance yet. I am trying to search a dataset for a value. If the dataset contains the value, I'd like the app to do something. If it doesn't, the app needs to do something else. The data breaks down like this: I have affiliates and users, each with a HABTM relati...
After reading up on a few experiences, I feel this issue might need to be brought up again. Coding in Rails3, I'm trying to implement some smooth Ajax effects when a user tries to create a post on another element of my app. Here's the code I'm concerned with: app/views/posts/new.html.haml - form_for @post, :remote=>true do |f| = ...