Sunday, December 27, 2009

[Rails] Re: rescue_from ActionController::RoutingError II

Ralph Shnelvar wrote:
> Marnen Laibow-Koser wrote:
>> Ralph Shnelvar wrote:
>> [...]
>>> I tracked through environment.rb with a debugger and
>>> RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
>>> RAILS_GEM_VERSION is undefined before the statement and is defined as
>>> RAILS_GEM_VERSION = "2.0.2"
>>> afterwards.
>>
>> Why did you need a debugger for that? That's the standard way of
>> specifying Rails versions.
>
> Because, Marnen, what is utterly obvious to you ... what you know by
> experience or having read it somewhere, is something new to me.

There is a comment explaining exactly this right in the environment.rb
file that Rails generates for you. Surely you've looked in that file
before...

>
>> Why the hell would you use restful_auth? It has virtually no advantages
>> over Authlogic and many disadvantages. I already explained this to you
>> in some detail.
>
> And I explained that the restful code does email authorization. This is
> a fair amount of code for ME to write.
>
>>>
>>> The http://code.google.com/p/simply-rich-authenticator code does a lot
>>> of stuff I want (e.g. email confirmation of the user's email account).
>>>
>>
>>You should be able to do that pretty easily with Authlogic.
>
> It may be easy for you. It is a huge undertaking for me.

I don't think you have to do it from scratch. IIRC, Authlogic provides
e-mail activation in an even better way than restful_auth does.

>
> There is state logic that I need to maintain (e.g. "email not
> confirmed") that I am not comfortable maintaining.

You don't need to.

>
> There is security code (e.g. the URL the user clicks on) that needs to
> be generated and responded to ... more state information.
>
> The restful code sample ...
> http://code.google.com/p/simply-rich-authenticator
> ... uses "Acts As State Machine". Is this independent of the restful
> authentication

5 seconds of Google searching will answer that.

> and is it wise to use this in the Authlogic code?

I don't think you need to, although you probably could.

>
>>
>>> Yet ... I am reading a lot about why I should not use it.
>>>
>>> Some advice, please.
>>
>> I already gave you some in an earlier post. Perhaps you should go back
>> and read it instead of acting like you never saw it. Remember: we'll
>> help, but you have to read the help. It's not really fair to ask the
>> same question multiple times.
>
> I have read your advice. You have advised ... without much background
> ... that authlogic is better. But is it better in the case where a
> more-or-less complete application has already been generated?
>

Yes. First of all, you shouldn't be relying too heavily on cookbook
code, and second, where did you get the idea that Authlogic sample apps
don't also exist? In fact, they do.

> While you are obviously knowledgeable, following you advice without me
> having the appropriate background is difficult.

Then feel free to ask questions or do independent research. I usually
phrase my answers in such a way as to encourage such research. This is
deliberate -- I prefer to guide rather than supply ready-made answers.

>
> It appears to me that you have forgotten that it is the simple things
> that cause the greatest confusion.

I have not forgotten, and if anything I say is confusing, I will clarify
it. But please meet me halfway by making a bona fide effort to
research, experiment, and understand before looking up the answers in
the back of the book. :)

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
--
Posted via http://www.ruby-forum.com/.

--

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate