Skip to content

Instantly share code, notes, and snippets.

@satblip satblip/Json_except.rb
Last active Dec 20, 2015

What would you like to do?
Exception with JSON Rendering in Rails
# I use this code to render the JSON
format.js { render :json => @courses_list.to_json( :except => [ :account_id, :default_view, :public_syllabus, :storage_quota_mb, :apply_assignment_group_weights, :calendar ] )}
# But it still give me this as result :
"course_code":"Audio Mastering 101 - 0913",
"name":"Audio Mastering 101",
"course_code":"Sound Design 101",
"name":"Sound Design 101",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.