> On Jun 21, 8:04 pm, Xiahong Gao <[email protected]> wrote:
> I am newb. I feel confused about how params works.
>
> I understand @params is an attribute of CLASS, but what is params? A
> named parameter? Because I thought instance attributes always begin
> with "@”, so params/request/flash/etc looks like a local variable.
>
> thanks in advance
> Xiahong

params, request, etc are just instance methods that return hashes.

for example, flash'es implementation (action_controller/flash.rb):

       def flash #:doc:
          unless defined? @_flash
            @_flash = session["flash"] ||= FlashHash.new
            @_flash.sweep
          end

          @_flash
        end



--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to