ビュー部分に地図を表示するためにgmaps4rails gemを使用しています。
gmaps4rails '1.5.6'
レール 4.0.0
ルビー 2.0.0
モデル アクション
class Location < ActiveRecord::Base
acts_as_gmappable
def gmaps4rails_address
address
end
end
コントローラ アクション
class LocationsController < ApplicationController
def show
binding.pry
@locations = Location.all.to_gmaps4rails
end
end
ここでそのショー
**NoMethodError: undefined method `to_gmap4rails' #<ActiveRecord::Relation::
どんな応答でも返信してくださいありがとう