mongoid

    0

    2답변

    MongoDB를 사용하여 리소스 예약을 예약하십시오. 깨진 클라이언트가 시스템을 중단시키지 않도록 서버 시간과 기본 쿼리를 얻고 싶습니다. 나는 서버 측 자바 스크립트에서 가능하다고 생각하지만 직접 mongoid gem으로 지원되지 않으며 DB 사용자 권한으로 인해 작동하지 않습니다. 내가하고 있어요 : time_now = MongoModels::User.

    1

    1답변

    사용자 모델의 uniquness를 테스트하고 싶습니다. 내가 bundle exec rspec를 실행 한 후 항상 다음 오류가 발생 대신에 통과 ... before(:each) do FactoryGirl.create(:user, email: taken_mail) end it "with an already used email" do e

    1

    1답변

    는 내가 첫 번째 모델의 일부 기록이 먼저 모델 firstmodelobj.second_model으로 콘솔 c는 내 레일에 객체에서 내가 두 번째 모델 기록을 얻을 수있는 두 가지 모델 Class FirstModel embeds_one :second_model, class_name: 'V1::SecondModel' Class SecondModel

    0

    1답변

    모두! 다운로드 할 수있는 파일에 대한 링크를 표시하는보기 show이 있습니다. 어떻게보기 show에서 컨트롤러 download_file 방법에 MYFILE 개체를 전달할 수 있습니다 - def download_file @myfile = Myfile.find(params[:myfile]) <======this line does not work s

    0

    1답변

    : class User field :first_name field :last_name embeds_one :administrateur embeds_many :customers embeds_one :contractor 가 지금은 둘 다 처음과 마지막에 (고객을 자동으로 완성 할 수 있도록하려면를 이름). 그때

    0

    2답변

    내가 보드에 카드를 저장하기 위해 노력하고있어 (위원회는 유지됩니다) : def createCard(user, board, section, color) res = false ua = UserAccount.find_by(username: user) board = Board.find_by(_id: board) card = C

    0

    1답변

    를 사용하여 레코드를 가져 나는 다음과 같은 기록이 : 나는 또한 시도 @availability = Availability.where(:availability_date.gte => DateTime.now.to_datetime.in_time_zone("Madrid")).and(:availability_date.lte => DateTime.now.to_date

    0

    2답변

    나는 명백한 이유없이 완료하기 위해 많은 시간이 걸리는 레이크 작업 (레일스 3/몽고 이드)이 필요합니다. 내 추측은 내가 필요하지 않은 곳에서 여러 번 뭔가하고 있다는 것입니다. (I 더 MongoDB를 또는 Mongoid 전문가는 아니지만) 매우 분명 뭔가 실종 : task :fix_editors => :environment do (0...50

    0

    1답변

    레일 웨이 모델을 몽고이 :: 버전 관리로 설정했습니다. class Post include Mongoid::Document include Mongoid::Timestamps include Mongoid::Versioning field :name, type: String end 특정 이전 버전을 삭제하고 싶습니다.

    0

    1답변

    하나의 몽고이 쿼리로 다음 두 가지 몽고이 쿼리를 수행하려고합니다. 나는 Mongoid 문서에서 해결책을 찾고자했지만 아무 것도 찾을 수 없었다. 검색어 1 Event.where(:start_time.gte => current_date.to_s, :start_time.lte => date_after_2_weeks.to_s) 쿼리 2 Event.where