Displaying 3 results from an estimated 3 matches for "effective_d".
Did you mean:
effective_
2007 Oct 16
3
Controller iterating through returned records and appending to each
...quot;current_goal=" because I kept getting "unexpected call"
errors on each.
Controller excerpt:
def employee_report
@employees = Employee.find_active_employees
@employees.each { |e| e.current_goal = e.billablegoals.empty? ? "-" :
e.billablegoals.select { |bg| bg.effective_date <= Date.today }[0].goal }
end
Spec:
require File.dirname(__FILE__) + ''/../spec_helper.rb''
describe ManagementController, "GET /management/employee_report" do
before(:each) do
@bg1 = mock_model(Billablegoal, :effective_date => Date.today-3.months,
:go...
2006 Dec 20
6
select lists - DB best practice
Hey guys,
I''m putting together an app with user profiles, and each user will be
able to update a section called ''quick stats''.
This will involve lots of drop down lists with options like ''hair
colour'', ''height'', ''Location'' etc etc.
The way I m thinking about doing it is to create new table for each
group of options
2006 Jul 01
3
best approach to add form elements dynamically
I am struggling with how to add dynamically add form elements to a form
based on user action. Now here is my situation:
I have model Project that has_many line_items
On the form to create a project I initially display form elements (some
drop downs and text boxes) for adding just one line_item. There is also
a button or a link on the page (not sure if this should be in the main
form or