how to pass variable to json in ruby code example
Example: rails call multiple variable format json
respond_to do |format|
format.html
format.json {
render json: {
all_data: {
data: @data,
data1: @data1,
data2: @data2
}
}
}
end