slim-lang Questions
3
Solved
I'm new to Middleman and ruby in general.
I've installed Ruby
I've installed Middleman and the gems to get it running.
I need to use slim instead of the default template system.
So I installed t...
4
Sorry for such a silly question, but couldn't find it on the docs:
filename.slim
filename.html.slim
This seems like a really great language to work with. I've used HAML before, so I think t...
Durga asked 6/7, 2014 at 15:11
3
Solved
Trying to convert *.html.slim views to *.html.erb. I've looked at these two questions:
How can I convert html.slim to html.erb? - getting uninitialized constant when called from the console
How c...
Chokecherry asked 5/8, 2015 at 15:50
1
I'm converting multiple html.slim files to html.erb. After following plenty of brilliant advice and tips on stack overflow, I'm pretty much done, but I'm not happy with the html.erb code that is ge...
Scroop asked 19/7, 2016 at 7:38
3
Solved
I am using simple_form in my rails application. I want to disable a particular value in drop-down.
Here is part of the code
= simple_form_for(@organization,url: admin_organization_path) do |f|
...
Osage asked 3/2, 2016 at 12:26
6
Solved
How to generate dynamic class name?
li v-for='obj in objs'
| {{ obj.id }} {{ obj.title }}
div id="obj-{{ obj.id }} " style="float:right; color:red;"
This sample doesn't work! I need this clas...
4
Solved
I want to seperate currency and total with whitespace.
Please suggest me a solution
Any help would be appreciated.
p
strong Total:
span
= @order.currency
= humanized_money_with_symbol @order.t...
Appassionato asked 23/11, 2015 at 7:54
3
Solved
I am using slim for templating and ruby on rails(just started using them). The only problem I am facing is: there is no formatting for the html rendered. i.e no line breaks, no indentation.
I can u...
Gaffrigged asked 24/2, 2013 at 12:49
5
Solved
I'm trying to render a link preceded by an icon. I'm using Slim templating engine along with Bootstrap CSS.
Usually you could do this the following way:
<a href="#"><i class="icon-user"&...
Mokpo asked 11/6, 2012 at 22:4
4
Solved
I need to convert the html.slim files in my Ruby on Rails application to html.erb. Is there any easy way to do it? I tried many options listed in Stack Overflow and other sites. But nothing worked ...
Stagemanage asked 4/2, 2015 at 7:44
2
Solved
I have looked at the documentation of slim, and I still can't figure out how to do this in slim:
<%= form_for([@post, @post.comments.build]) do |f| %>
<div class="field">
<%= f.la...
Impiety asked 30/10, 2012 at 16:1
3
I m laying out a form using the Slim template language and want to add the required attribute to my input.
input#first_name(required name="first_name" type="text" pattern="^[A-Z][a-z]+$")
Howeve...
Steinke asked 1/8, 2013 at 2:10
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
3
Solved
In rails slim (http://slim-lang.com/) the syntax for defining a new div with a class name "sample" is the following:
.sample
= "Content goes here"
this will create:
<div class="sample">...
Rateable asked 12/10, 2012 at 3:35
3
How do I set a SCSS variable based on ruby variable value?
Following code is working for CSS but not for SCSS:
- primaryColor = app.theme_variables['primary-color'];
= content_for(:after_head_scr...
Capitulate asked 18/9, 2016 at 20:38
3
Solved
What would the below js.erb template look like when rewritten into slim?
$('#new_reservation').hide().after('<%= j render("new_reservation") %>');
Dactylology asked 26/11, 2014 at 20:31
1
Element needs a lot of class attributes but I don't want them to be chucked in one line, as the line length will be too long and it would require heavy side scrolling.
Preferably, I don't want to ...
Feola asked 5/12, 2017 at 5:42
2
Solved
I have trouble understanding basic Slim syntax.
First question, how to do you enter new line (line break)?
Second request, could you please rewrite the following snippet, I suspect I didn't...
Parrett asked 18/9, 2013 at 16:11
2
Solved
I am aware of this post here:
Ruby Slim - How do you define an element's class with a rails helper or variable?
and I have tried all three solutions. For me unfortunately not one of them is w...
Destefano asked 3/9, 2014 at 7:48
3
Solved
There is a way to put ruby conditions inside javascript block? i.e.
javascript:
var config = {
common_value_1 : 1,
common_value_2 : 2
};
- if my_value === true # this must be a ruby conditi...
2
Solved
How do I nest the 'Featured' text inside the a tag, given the span, the text, and the other span are siblings?
li
a href="#" class="selected"
span class="icon-before"
Featured
span class="icon...
Jennefer asked 22/11, 2012 at 14:21
4
Solved
I am trying to add a space to the start of my slim template where I have had to break the text due to a link, I cant for the life of me work this one out
.mdl-cell.mdl-cell--4-col-phone.mdl-cell--...
Hilmahilt asked 14/8, 2016 at 9:37
1
Solved
I have a Ruby on Rails application with mailers that use slim for the views.
I want to mark up an email with the Google markup format.
It calls for a script tag with the type of JSON-LD, like this...
Teage asked 13/4, 2016 at 2:3
1
Solved
I am currently using Angular and Slim in my Ruby On Rails Project. I have an array of questions in my js.coffee that are currently being rendered in my view.
One of the strings in the array has s...
Openfaced asked 30/3, 2016 at 4:20
1
Solved
I am trying to hook up refile to my view and I am getting the following error:
Here are my models:
class Job < ActiveRecord::Base
acts_as_paranoid
acts_as_taggable
acts_as_taggable_on :la...
Benares asked 9/2, 2016 at 7:10
1 Next >
© 2022 - 2024 — McMap. All rights reserved.