On 12/15/10 12:40 PM, Finne Jager wrote:
Just another quick question if you don't mind.
I'm trying to manually append a SafetyOfficer to the Timesheet with the
Rails console:
Incident.first.timesheet.safety_officer<< SafetyOfficer.last
This is pulling just the first record found of incident so
Just another quick question if you don't mind.
I'm trying to manually append a SafetyOfficer to the Timesheet with the
Rails console:
Incident.first.timesheet.safety_officer << SafetyOfficer.last
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance
On Dec 13, 2010, at 3:08 PM, Finne Jager wrote:
On a side note, by changing the resources to nested instead of top
level, it broke my Index page which shows a list of Incidents and
their
Timesheets. It pointed out this line of code:
<%= link_to 'View Time Sheet',
Finne Jager wrote in post #968131:
>>> On a side note, by changing the resources to nested instead of top
>>> level, it broke my Index page which shows a list of Incidents and their
>>> Timesheets. It pointed out this line of code:
>>>
>>>
>>> <%= link_to 'View Time She
>> On a side note, by changing the resources to nested instead of top
>> level, it broke my Index page which shows a list of Incidents and their
>> Timesheets. It pointed out this line of code:
>>
>>
>> <%= link_to 'View Time Sheet', timesheet_path(incident) %>
>> -
Finne Jager wrote in post #968122:
> Thank you, I appreciate your help so far, I've been struggling with this
> for days now.
>
>> And Timesheet belongs_to :incident , I hope?
>
> Correct.
>
>> See the routing documentation. Once you *do* nest them, you get the
>> routes you need for free.
>>
>> I
Finne Jager wrote in post #968122:
> Thank you, I appreciate your help so far, I've been struggling with this
> for days now.
>
>> And Timesheet belongs_to :incident , I hope?
>
> Correct.
>
>> See the routing documentation. Once you *do* nest them, you get the
>> routes you need for free.
>>
>> I
Thank you, I appreciate your help so far, I feel like we're getting
there!
> And Timesheet belongs_to :incident , I hope?
Correct.
> See the routing documentation. Once you *do* nest them, you get the
> routes you need for free.
>
> If you don't want to nest them, other solutions are possible,
Finne Jager wrote in post #968117:
> Marnen Laibow-Koser wrote in post #968112:
>> Bizarre. new_*_path doesn't normally take an argument (except for an
>> optional format string, which is why you're getting the .16 below).
>
> Is there another way to pass the incident object to the New Timesheet
>
Marnen Laibow-Koser wrote in post #968112:
> Bizarre. new_*_path doesn't normally take an argument (except for an
> optional format string, which is why you're getting the .16 below).
Is there another way to pass the incident object to the New Timesheet
method? The new Timesheet needs to know it
Finne Jager wrote in post #968107:
> I have two forms that people need to fill out, an Incident form and a
> Timesheet form. I want the Timesheet form to appear right after a user
> submits the Incident form.
>
> This is my code for the Incident controller;
> ---
11 matches
Mail list logo