Merb Wiki
Home
All Pages
New Page
Editing Using Haml with Merb
Textile Enabled
| [[Page Name]] for internal links
Haml will cut the time you spend on view code in half, and Merb offers just enough sugar to make writing views feel really natural. h2. Blog Posts * "How to use Haml with Merb":http://alan.christopherthom.as/2008/07/14/how-to-use-haml-with-merb/ * "HAML + Merb Helpers? Very noice.":http://toolmantim.com/article/2008/4/17/haml_merb_helpers_very_noice h2. A Basic Form for your Create action <pre><code class="ruby"> - form_for(:class, :action => url(:classes), :method => :post) do %p= text_control(:name, :label => "Class Name") %p= select_control(:teacher, :label => "Teacher", :collection => @teachers) %p= text_area_control(:description, :label => "Class Description") %p= submit_button "Create" </code></pre> h2. Coming from rails If your sass templates doesn't compile automatic in your app, just run <code> rake haml:compile_sass </code> h2. Testing Rspec view tests might not work because Haml uses single quotes by default. To instruct Haml to use double quotes add the following to Merb::Config in config/init.rb: <code> c[:haml] = { :attr_wrapper => '"' } </code>
Submit
Recent Activity
Home
was updated
Home
was updated
deploying-a-merb-application-to-a-jee-container-us
was updated
deploying-a-merb-application-to-a-jee-container-us
was updated
Merb Developers available for work
was updated
deploying-a-merb-application-to-a-jee-container-us
was updated
deploying-a-merb-application-to-a-jee-container-us
was updated
deploying-a-merb-application-to-a-jee-container-us
was updated
deploying-a-merb-application-to-a-jee-container-us
was updated
Home
was updated