2010/1/5 Laim Bee :
>...
>
> So what's the best way to debug why the create method is not working
> properly? Is there a way to set a global variable that would be viewable
> from ruby script/console?
Have a look at the RoR guide on Debugging at http://guides.rubyonrails.org/
Colin
--
You recei
Frederick Cheung wrote:
> On Jan 2, 5:21�pm, Laim Bee wrote:
>> Frederick Cheung wrote:
>
>> How does Rails know when you click the Submit button, that you want to
>> initiate the create method in the comments controller?
>
> The conventions (in particular REST) that rails uses dictate that to
>
On Jan 2, 5:21 pm, Laim Bee wrote:
> Frederick Cheung wrote:
> The New Comment form displays ok on the front page (I just took the new
> view from the comments controller moved a copy of it into my blogs
> view). I then rendered it as a partial. When I click on the "Create"
> button, I get a 404
Frederick Cheung wrote:
> On Dec 28, 3:56�am, Laim Bee wrote:
>> I also tried creating a new Note in the production environment (using
>> ruby script/server production) and got the following error (See below).
>> It looks like a table doesn't exist? Is it possible that when I
>> db:migrate 'd my t
Aldric Giacomoni wrote:
> Laim Bee wrote:
>> Aldric Giacomoni wrote:
>>>
>>> <% note = note rescue Note.new %>
>>> But, that is just a band-aid, and it's pretty easy to lose track of
>>> quick-fixes like that - what you are doing, passing in a new class, is
>>> much closer to the behavior you wa
On Dec 28, 3:56 am, Laim Bee wrote:
> I also tried creating a new Note in the production environment (using
> ruby script/server production) and got the following error (See below).
> It looks like a table doesn't exist? Is it possible that when I
> db:migrate 'd my table, it did it only to the
Laim Bee wrote:
> Aldric Giacomoni wrote:
>>
>> <% note = note rescue Note.new %>
>> But, that is just a band-aid, and it's pretty easy to lose track of
>> quick-fixes like that - what you are doing, passing in a new class, is
>> much closer to the behavior you want to emulate, so it's better.
>
On Dec 21, 1:12 am, Laim Bee wrote:
> In the _new_note partial, I put one line of text for testing. If I don't
> include " :locals=>{:note=>Note.new} " in my render statement, the text
> will pull in fine. Otherwise, I will get a 500 error. Is there something
> wrong with the Class (causing the
Aldric Giacomoni wrote:
> Laim Bee wrote:
>>
>> -In the View that I am trying to add the partial to, I added the
>> following code:
>> <%= render :partial=>"new_note", :locals=>{:note=>Note.new} %>
>>
>> In the _new_note partial, I put one line of text for testing. If I don't
>> include " :locals
Laim Bee wrote:
>
> -In the View that I am trying to add the partial to, I added the
> following code:
> <%= render :partial=>"new_note", :locals=>{:note=>Note.new} %>
>
> In the _new_note partial, I put one line of text for testing. If I don't
> include " :locals=>{:note=>Note.new} " in my rende
10 matches
Mail list logo