나는이 가득 설정 파일을 가지고 .... haml 구문 - 이것을 작성하는 더 좋은 방법은 무엇입니까?
- if current_page.include? "test_string_one"
- @total_index = 3
- @next_location = '../random_string/page0.html'
- @next_name = 'title 2'
- if current_page.include? "test_string_two"
- @total_index = 10
- @next_location = '../another_random_string/page0.html'
- @next_name = 'title 3'
이를 작성하는 청소기 방법이 있나요?
Staticmatic 사용.
haml에서 사용할 수있는 필터가 있습니다. 이 모든 것이 :ruby
에 있어야합니까?
Dup는 http://stackoverflow.com/questions/1743291/haml-syntax-better-way-of-writing-this- –