You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class City < ActiveRecord::Base
class << self
def directory
@active_cities = []
Settings.cities.each do |name|
#active_cities << find_by_name('')
@active_cities << where(name: name).first
end
@active_cities
end
end
end
If I remove RailsConfig, it does work:
class City < ActiveRecord::Base
class << self
def directory
@active_cities = []
['杭州市'].each do |name|
#active_cities << find_by_name('')
@active_cities << where(name: name).first
end
@active_cities
end
end
end
The text was updated successfully, but these errors were encountered:
@SharpV could you please post some more info about this issue? I tried the syntax with current version and it seems to be working fine. If no feedback given, I would need to close this issue as invalid...
This's my code:
If I remove RailsConfig, it does work:
The text was updated successfully, but these errors were encountered: