Project

General

Profile

« Previous | Next » 

Revision c0537928

Added by Thomas McKay over 10 years ago

fixes #3853 - allow rabl template override to be specified

3853-taxonomy-rabl - changed style of override

View differences:

app/controllers/concerns/api/v2/taxonomies_controller.rb
@total = taxonomy_class.count
end
instance_variable_set("@#{taxonomies_plural}", @taxonomies)
render 'api/v2/taxonomies/index'
@render_template ||= 'api/v2/taxonomies/index'
render @render_template
end
api :GET, '/:resource_id/:id', 'Show :a_resource'
def show
render 'api/v2/taxonomies/show'
@render_template ||= 'api/v2/taxonomies/show'
render @render_template
end
api :POST, '/:resource_id', 'Create :a_resource'

Also available in: Unified diff