My bad, I haven't used google groups for a long time forgot about it. I found this method object.method(:method_name).source_location . Apparently comes from active model /.rvm/gems/ruby-2.0.0-p353/gems/activemodel-4.0.2/lib/active_model/attribute_methods.rb", 382]. Thanks for the help
On 20 Dec, 2013, at 1:10 am, Colin Law <clanlaw@gmail.com> wrote:
> On 19 December 2013 16:56, <shwntn1@gmail.com> wrote:
>> Colin yes if i uncomment it out does still run but how do i find where the
>> code replication takes place? I think its one of the additional gems but i
>> don't know how to search for where this method exists
>
> Please don't top post, it makes it difficult to follow the thread. Thanks.
>
> As I said if you have a look at the rails guide on debugging it will
> show you how you can step into the code. Also you could do a global
> text search in your application and gems directories.
>
> Are you using Devise? If so I would start there. Googling for the
> method name gave me that clue.
>
> Colin
>
>>
>> On Friday, December 20, 2013 12:50:45 AM UTC+8, Colin Law wrote:
>>>
>>> On 19 December 2013 16:41, <shw...@gmail.com> wrote:
>>>> I am having problems calling a method reset_authentication_token! . if i
>>>> just leave the method as it is with the ! behind it the method is simply
>>>> ignored when the program is run (none of the logger methods inside the
>>>> method is called.) But if i add any other character into it the method
>>>> gets
>>>> called
>>>>
>>>> Below is the module of the methods.
>>>> This module is included in user.rb
>>>>
>>>> The module auth_token.rb
>>>> http://pastie.org/8563575
>>>>
>>>> The user.rb
>>>>
>>>> http://pastie.org/8563585
>>>>
>>>> This is the session_controller.rb file
>>>>
>>>> http://pastie.org/8563578
>>>>
>>>> The reset_authentication_token! is called from the main create method
>>>> which
>>>> calls the @user.ensure_authentication_token!
>>>
>>> Is it possible that there is another method
>>> reset_authentication_token! in the system somewhere? If you comment
>>> out your method and run the code do you get a runtime no method error?
>>> If not then there is another method of this name.
>>>
>>> For the future, have a look at the Rails Guide on debugging to see how
>>> to debug your code and see what is happening by stepping into that
>>> method.
>>>
>>> Colin
>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups
>>>> "Ruby on Rails: Talk" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an
>>>> email to rubyonrails-ta...@googlegroups.com.
>>>> To post to this group, send email to rubyonra...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>>
>>>> https://groups.google.com/d/msgid/rubyonrails-talk/5624c2e9-273b-4a2f-b67d-ab25fa261a1c%40googlegroups.com.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby on Rails: Talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to rubyonrails-talk+unsubscribe@googlegroups.com.
>> To post to this group, send email to rubyonrails-talk@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/rubyonrails-talk/a2de6573-761d-4e6d-8d6e-aa2c88a8c22d%40googlegroups.com.
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/p278qe9bX4A/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuMwGnjFO3V_mQGgr6tVC0yyvPkhx%2B3N-rd0mxpr7zadQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/16D7B4B8-B4F5-43CD-AFC2-606ACC10F769%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment