haml Questions

1

Solved

I'm upgrading an application from rails 6 to 7 and replacing ujs with turbostreams. The current ujs $('#sightings_by_type').html("<%= escape_javascript (render partial: '/member/spotting_se...
Sphenogram asked 17/1 at 14:23

2

Solved

I'm using the rails framework with HAML and I have bootstrap setup. How would I format the field inputs seperately. I want the input field for name to be 60% of the screen float left and the input ...
Dennie asked 6/7, 2013 at 20:59

1

Short description (we are in browsers debugger network tab): AJAX GET /page/42 takes ~20s replay/resend this XHR takes ~15s open this XHR in new tab takes ~1.5s (only!) replay/resend this XHR take...
Pannonia asked 7/8, 2017 at 19:33

4

Solved

My problem is that I'm trying to do something like current_page?(controller: 'tigers', action:('index'||'new'||'edit')) which returns true when the controller is tigers and the action is either ...
Chore asked 1/2, 2014 at 0:54

5

Solved

From what I understand, link_to is used for get methods, and button_to is used for post methods. On the other hand, I was told that with HTML5 semantics, <button> is used for any type of cl...
Seriema asked 29/4, 2012 at 17:35

3

Solved

I'd like to do the following in Haml-Coffee: - case msg.type - when "usertext" = msg.body - when "direct" = msg.content.kbcontent_body But I get an error "Reserved word "case"" I suspect it'...
Hesychast asked 16/2, 2012 at 15:47

3

Solved

The code below is working [email protected] do |item| %tr %td =item.quantity times %td= item.product.title end However I want to use { } instead of do ... end. Is it possible? [email...
Terrilynterrine asked 7/8, 2012 at 8:46

5

Solved

I have a common view that lists two different models. The only difference is that when setting the link_to action, one of the models has a link attribute and the other doesn't. I want to check if t...
Weathers asked 6/10, 2013 at 18:10

19

Solved

I use Ruby 1.9.2 and Rails 3.0.5 I have the following error: incompatible character encodings: ASCII-8BIT and UTF-8 It has nothing to do with the database i think. The error is happinging on...
Hallette asked 12/3, 2011 at 22:55

8

Solved

is there an existing plugin/app/program/script/whatever that analyzes and counts the css selectors of a file? i want to check if the reason my css file is not working in IE is because my selector c...
Brickwork asked 8/3, 2011 at 4:48

2

Solved

How to add attributes like async or defer in script tag in Haml? I tried to put it on a same line as href, but it does not work. %a.twitter-share-button{href: "https://twitter.com/share?ref_src=t...
Vierno asked 25/11, 2017 at 4:1

3

Solved

I have an annoying view problem that I'm trying to debug and no where on the Haml Documentation Haml Docs does it specify how to debug view code. This is very annoying and all I need is to debug a ...

12

I happened to stumble across HAML, an interesting and beautiful way to mark up contents and write templates for HTML. Since I use Python and Django for my web developing need, I would like to see ...
Innis asked 6/2, 2009 at 9:30

5

Solved

I have a form with input fields/labels etc. How do I get the error message to show up next to the field? instead of clumped together at the top? I am using devise, rails 3 I have this at the top ...
Langrage asked 13/4, 2011 at 9:9

3

Solved

I can have %a{href: '#', data_toggle_description_length: 'toggle_me_ajax'} which it gives me underscores not dashes, i.e. <a href="#" data_toggle_description_length="toggle_me_aj...

2

Solved

I am trying to use the w-2/3 class from Tailwind CSS with HAML in a Rails .html.haml file. The forward slash is causing Rails (or HAML) to throw an exception and I don't know how to format it so it...
Dowie asked 20/8, 2019 at 11:49

2

Given this Vue 2 component: Vue.component('read-more', { props: { 'text': String, 'clamp': { type: String, default: 'Read More' }, 'less': { type: String, default: 'Read Less' }, 'leng...
Mews asked 10/7, 2017 at 23:42

5

Solved

How can I use multiple lines for a single Ruby statement in HAML? For example, I'd like to write something like the following: - entries = [{ - :title => "The Fellowship of the Ring", - :body...
Armrest asked 24/3, 2013 at 23:10

10

I am trying to get Haml to work with my Ruby on Rails project. I am new to Ruby on Rails and I really like it. However, when I attempt to add an aplication.html.haml or index.html.haml for a view, ...
Hawker asked 19/9, 2008 at 3:12

6

How I can add checkbox with simple_form without association with model? I want to create checkbox which will handle some javascript events, but don't know? Maybe I miss something in documentation? ...
Derinna asked 7/2, 2012 at 19:18

3

I got the wrong haml in http://html2haml.heroku.com/ How to convert it in proper way ? Because the haml didn't render the identical html when I load the page HTML <style media="screen"> ...
Nocuous asked 3/8, 2014 at 6:38

3

Solved

I have the following html.erb code that I'm looking to move to Haml: <span class="<%= item.dashboardstatus.cssclass %>" ><%= item.dashboardstatus.status %></span> What it...
Mocha asked 8/8, 2008 at 19:56

4

Solved

During refactoring it would be quite handy just to copy part of HAML template and paste it to helper's code. Currently in such cases 1) I have to rewrite that part of view from scratch 2) I have to...
Maser asked 9/3, 2011 at 11:58

2

Solved

I need a series of classes, .module1, .module2, ... module(n). I also want to define those classes using css, ruby and HAML: :css .mod1 { background-image: url("#{extra.image}"); } Is it pos...
Buskus asked 11/7, 2011 at 21:36

4

Solved

I was evaluating Slim as a replacement for HAML in a personal project, and it doesn't appear to handle HTML5 data attributes as gracefully as HAML. I was hoping someone may have also run into this,...
Selfregulated asked 22/9, 2013 at 19:42

© 2022 - 2024 — McMap. All rights reserved.