Создал модель Carrier, но не могу сделать выборку по базе - выдает ошибку undefined method `all` и так далее.
Carrier.class выдает Module
Остальные модели отдают Class
В списке зарезервированных слов не нашел. Как быть? Что не так?
Самое интересное если переименовать модель в Ucarrier то все норм.
Модель:
class Carrier < ActiveRecord::Base
belongs_to :user
end
Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.1'
gem 'russian', '~> 0.6.0'
gem 'mysql2'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby
gem "less-rails"
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
gem 'activeadmin', github: 'gregbell/active_admin'
gem "just-datetime-picker"
gem "slim-rails"
gem 'awesome_nested_set', "~> 3.0.0.rc.2"
gem "the_sortable_tree", "~> 2.3.0"
gem "devise"
gem "cancan"
gem 'quiet_assets', :group => :development
gem 'jquery-ui-rails'
gem "paperclip", "~> 3.5.2"
gem "nested_form"
gem "acts_as_list"
gem "better_errors"
gem 'seed_dump'
gem "rails_config"