Commit 6193988a22e2e71224407f551f0ea718ee31220e
1 parent
a96ac23f
Exists in
update_software_api
Return only a string for some software fields
Signed-off-by: Marcos Ronaldo <marcos.rpj2@gmail.com> Signed-off-by: Matheus Fernandes <matheus.souza.fernandes@gmail.com>
Showing
1 changed file
with
13 additions
and
3 deletions
Show diff stats
src/noosfero-spb/software_communities/lib/software_communities_plugin/api_entities.rb
| ... | ... | @@ -15,9 +15,19 @@ module Entities |
| 15 | 15 | expose :objectives |
| 16 | 16 | expose :features |
| 17 | 17 | expose :license_info, :using => LicenseInfo |
| 18 | - expose :software_languages | |
| 19 | - expose :software_databases | |
| 20 | - expose :operating_system_names | |
| 18 | + | |
| 19 | + expose :software_languages do |software_info, options| | |
| 20 | + software_info.software_languages.collect{|language| language.programming_language.name} | |
| 21 | + end | |
| 22 | + | |
| 23 | + expose :software_databases do |software_info, options| | |
| 24 | + software_info.software_databases.collect{|database| database.database_description.name} | |
| 25 | + end | |
| 26 | + | |
| 27 | + expose :operating_system_names do |software_info, options| | |
| 28 | + software_info.operating_system_names.collect{|operating_system| operating_system.name} | |
| 29 | + end | |
| 30 | + | |
| 21 | 31 | expose :community_id do |software_info,options| |
| 22 | 32 | software_info.community.id |
| 23 | 33 | end | ... | ... |