You can clone with
You can easily add any method of a model and its return value to the an api template by just adding the method name as a symbol.
class User < ActiveRecord::Base
api_accessible :only_full_name do |t|
'' << first_name.to_s << ' ' << last_name.to_s
Note: This will only work for public methods of the model.
Last edited by fabrik42, April 20, 2011