Hack hack hack...

An open journal-- some of it written for you, but most of it is for me.

HAW-day13

  • Checkboxes

    • return default goes at the end
    • preventDefault() goes at the beginning

    • return false goes at the end

    • we can import the deploys with client.deploys(‘project#’).first

    • You can also pass local variables into partials, making them even more powerful and flexible. For example, you can use this technique to reduce duplication between new and edit pages, while still keeping a bit of distinct content:

new.html.erb

1
2
3
<h1>New zone</h1>
<%= error_messages_for :zone %>
<%= render :partial => "form", :locals => { :zone => @zone } %>

Specifying a class in a link_to

Using Twitter Bootstrap
1
2
<div class="btn-group pull-right">
<%=link_to " Refresh Errors", errors_import_path, :class => 'btn icon-refresh btn-success' %>

Comments