Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def index
- params[:format] ||= "json" # This will move to a before_filter
- self.response_body = Project.all.send("to_#{params[:format]}")
- self.content_type = Mime::Type.lookup_by_extension(params[:format])
- end
Add Comment
Please, Sign In to add comment