Something like this should work:
render :json => @programs, :include => {:insurer => {:only => :name}}, :except => [:created_at, :updated_at]
More Related Contents:
- How do I parse JSON with Ruby on Rails? [duplicate]
- How to “pretty” format JSON output in Ruby on Rails
- How to override to_json in Rails?
- In Rails, how do you render JSON using a view?
- Add virtual attribute to json output
- How to convert a ruby hash object to JSON?
- Storing arrays in database : JSON vs. serialized array
- POST JSON to API using Rails and HTTParty
- POST json to rails server
- rails dates with json
- How to check for a JSON response using RSpec?
- ActiveRecord serialize using JSON instead of YAML
- JSON encoding wrongly escaped (Rails 3, Ruby 1.9.2)
- How to set request headers in rspec request spec?
- Rails Object Relationships and JSON Rendering
- raw vs. html_safe vs. h to unescape html
- Rails extending ActiveRecord::Base
- ActiveRecord OR query Hash notation
- How do I validate a date in rails?
- How to rollback a specific migration?
- Rails 4: organize rails models in sub path without namespacing models?
- GroupingError: ERROR: column must appear in the GROUP BY clause or be used in an aggregate function
- docker postgres with initial data is not persisted over commits
- Rails 3 disabling session cookies
- Rails 3 link_to (:method => :delete) not working
- Ruby on Rails Best practices – Big Controller vs Small Controller
- simple hit counter for page views in rails
- Rails: redirect all unknown routes to root_url
- Rails 3 autoload
- Store the day of the week and time?