-
Notifications
You must be signed in to change notification settings - Fork 57
Conversation
This reverts commit 8958346.
@@ -28,6 +30,13 @@ class Category < ActiveRecord::Base | |||
# table_name is needed to resolve ambiguity for certain queries with 'includes' | |||
scope :active, where("#{table_name}.deleted_at is null") | |||
|
|||
#def renewal_not_longer_than_checkout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we want to leave this commented-out code in?
I was originally going to remove validate_renew as a method since we could add in validations ensuring checkout length >= renewal length but I realized that validate_renew is still needed to override overdue validations. So we might as well keep the duration validation overridden too. This is why there is all the commented out code; I'll remove it |
placeholder: 'Start typing an equipment model name', collection: | ||
|
||
<%= f.association :associated_equipment_models, input_html: {class: 'input-xlarge'}, | ||
placeholder: 'Start typing an equipment model name', collection: | ||
EquipmentModel.find(:all, conditions: ["id != ?", params[:id]]) %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is now erring and telling me
Couldn't find all EquipmentModels with 'id': (all, {:conditions=>["id != ?", "6"]}) (found 0 results, but was looking for 2)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here's the trace (not super helpful tho):
app/views/equipment_models/_form.html.erb:12:in `block in _app_views_equipment_models__form_html_erb___1671969997400540714_70014930452620'
app/views/equipment_models/_form.html.erb:1:in `_app_views_equipment_models__form_html_erb___1671969997400540714_70014930452620'
app/views/equipment_models/edit.html.erb:3:in `_app_views_equipment_models_edit_html_erb___3156120513192557427_70014930401300'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a rails 4 deprecation, we can rewrite that line using a where in a block
<section id="details"> | ||
<h2>Details</h2><hr /> | ||
<!-- Title Row --> | ||
<%= content_tag :div, :class => 'row' do %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was all this? ERB generating div
tags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup :P
I'm getting an error when I try to create fresh databases and migrate them:
Steps to replicate:
This meant that I couldn't run the test suite locally, or rather, when I did there were over 300 failures :-P. Can someone else check and see if this happens for them? EDIT This is happening on other branches as well; I'm investigating... |
Ok, figured out how to run tests (see #853); assuming they all pass locally (which is expected) I'll merge this in. |
add optional max checkout length to equipment models
Resolves #749