diff options
author | Leon Breedt <bitserf@gmail.com> | 2005-05-01 05:07:37 +0000 |
---|---|---|
committer | Leon Breedt <bitserf@gmail.com> | 2005-05-01 05:07:37 +0000 |
commit | a080b1a231ba26e3d74fd1770abc97068a9d7095 (patch) | |
tree | 79e94d2ce13573d0818b74c3bb51a89b040b5658 /actionwebservice/lib/action_web_service/support | |
parent | b921b5da156d33a7ced0656074f659854fb9082e (diff) | |
download | rails-a080b1a231ba26e3d74fd1770abc97068a9d7095.tar.gz rails-a080b1a231ba26e3d74fd1770abc97068a9d7095.tar.bz2 rails-a080b1a231ba26e3d74fd1770abc97068a9d7095.zip |
add support for structured types as input parameters to scaffolding,
fixes scaffolding for APIs like metaWeblog that require an input
struct (by dropping structs in nested <ul> lists).
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1265 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionwebservice/lib/action_web_service/support')
-rw-r--r-- | actionwebservice/lib/action_web_service/support/signature_types.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionwebservice/lib/action_web_service/support/signature_types.rb b/actionwebservice/lib/action_web_service/support/signature_types.rb index 4ab4a08d9b..253e9dcb6a 100644 --- a/actionwebservice/lib/action_web_service/support/signature_types.rb +++ b/actionwebservice/lib/action_web_service/support/signature_types.rb @@ -150,6 +150,12 @@ module ActionWebService # :nodoc: def structured? false end + + def human_name(show_name=true) + type_type = array? ? element_type.type.to_s : self.type.to_s + str = array? ? (type_type + '[]') : type_type + show_name ? (str + " " + name.to_s) : str + end end class ArrayType < BaseType # :nodoc: |