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 do it easy way?
- provide(:title, @course.title)
.row
aside.span4
section
h1 = @course.title.capitalize
=> link_to t('ui.edit'), edit_course_path(@course)
'|
=> link_to t('ui.back'), courses_path
p
b #{t('activerecord.attributes.subject.title')}:
| #{@course.subject.title}
p
b #{t('activerecord.attributes.student_level.title')}:
| #{@course.student_level.title}
h4 #{t('activerecord.attributes.course.objectives')}
= @course.objectives
This is its output:
tahrirlash (edit) | orqaga
Predmet nomi: english 5-7 year olds
O'quvchi darajasi: beginner
objectives b
For new line, you should just use br like:
h1 Line1 content
br
h1 Line2 content
And about the above mentioned code, it can be rewrite like this:
-provide(:title,@course.title)
.row
aside.span4
section
h1 = @course.title.capitalize
= link_to t('ui.edit'), edit_course_path(@course)
'|
= link_to t('ui.back'), courses_path
p
b = t('activerecord.attributes.subject.title')
|:
= @course.subject.title
p
b = t('activerecord.attributes.student_level.title')
|:
= @course.student_level.title
h4 = t('activerecord.attributes.course.objectives')
= @course.objectives