【发布时间】:2009-11-16 18:01:39
【问题描述】:
我有一个完整的配置文件......
- 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 过滤器中吗?
【问题讨论】:
标签: ruby haml staticmatic