Forum: Ruby on Rails where is the ActionStruct::Base in rails???

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
94af373d42084bf8b07f461291a910a3?d=identicon&s=25 capitain (Guest)
on 2006-01-12 15:12
there is a example in

http://api.rubyonrails.com/classes/ActionWebServic...

and it mentioned
<code>
class SearchCriteria < ActionStruct::Base
    member :firstname, :string
    member :lastname,  :string
    member :email,     :string
end
</code>

but i can not find ActionStruct's source code in the rails's
distribution,and i found 'NameError: uninitialized constant
ActionStruct' when using it

should it be ActionWebService::Struct ?

Maybe it's a type error ?
94af373d42084bf8b07f461291a910a3?d=identicon&s=25 capitain (Guest)
on 2006-01-12 15:23
I also find the example in
http://api.rubyonrails.com/classes/ActionWebServic...
<code>
 class CustomService < ActionWebService::Base
    before_invocation :intercept_add, :only => [:add]

    def add(a, b)
      a + b
    end

    private
      def intercept_add
        return [false, "permission denied"] # cancel it
      end
  end
</code>
can't work at all

The method intercept_add need declare two parameters otherwise rails
will report "wrong number of arguments (2 for 0)"

my environment is rails 1.0 ,ruby 1.8.2, windows xp sp2
Cd8c9864d88bcafc164d8fdb820cc451?d=identicon&s=25 Chris (Guest)
on 2006-01-12 17:28
> my environment is rails 1.0 ,ruby 1.8.2, windows xp sp2

On the rails site i think it says not to use 1.8.2
Ad7805c9fcc1f13efc6ed11251a6c4d2?d=identicon&s=25 Alex Young (Guest)
on 2006-01-12 17:33
(Received via mailing list)
Chris wrote:
>>my environment is rails 1.0 ,ruby 1.8.2, windows xp sp2
>
>
> On the rails site i think it says not to use 1.8.2
>
>
Not so.  I'm using 1.8.2 on OS X 10.9.3, Windows 2000 and Debian without
problems.  The site says 1.8.3 is duff, though...
94af373d42084bf8b07f461291a910a3?d=identicon&s=25 capitain (Guest)
on 2006-01-13 04:25
I can't find ActionStruct in 1.8.3 either
Chris wrote:
>> my environment is rails 1.0 ,ruby 1.8.2, windows xp sp2
>
> On the rails site i think it says not to use 1.8.2
This topic is locked and can not be replied to.