Data dodania Pytanie
2017-08-10 11:08 rake aborted! ActiveRecord::RecordInvalid: Validation failed: Email can't be blank, Password can't be blank »
I am getting an error while doing heroku run rake db:seed rake aborted! ActiveRecord::RecordInvalid: Validation failed: Email can't be blank,...
(0) odpowiedzi
2017-08-10 10:08 after_destroy display unscoped value with observer class in rails »
I am trying to add to the activity canceled value with after_destoy in observer class, but no value come through to display. if the booking is deleted...
(1) odpowiedzi
2017-08-09 22:08 Rails scope doesn't return correct data »
When I use scope which I prepared in model, rails returns incorrect data. My Model: class CurrencyRate < ActiveRecord::Base scope :eur_today,...
(1) odpowiedzi
2017-08-09 21:08 How do I write this code with Rspec and selenium webdriver »
I'm doing tests in a website, and i have to check if the selected option from a dropdown menu is selected, but I don't know how to do it with Rspec I...
(0) odpowiedzi
2017-08-09 19:08 Is there a more efficient way of returning a hash value given array of keys if hash key/value is present? »
I have a method which accepts a hash, and I have an array of keys (ordered by preference) which I want to check the hash for and return the value of t...
(2) odpowiedzi
2017-08-09 18:08 Need guidance to use .map,.group,.pluck, etc. to make multi series line chart in ruby on rails app »
I'm trying to display a multi series line chart using chartkick in a Ruby on Rails app. The chart should display paper_types and the weightfor each...
(2) odpowiedzi
2017-08-09 17:08 undefined method `get_header' for Rack::Handler::Servlet::DefaultEnv »
I am attempting to deploy a Rails 5.1 app to a Tomcat 7 server as a war file that I packaged with warbler. When I attempt to visit any page, the app c...
(0) odpowiedzi
2017-08-09 17:08 How to convert a plain sql query with subqueries to use rails active record »
I have tried converting this plain sql query to rails active record but I am unable to do so. select vote_shares.election_year as vs_election_nam...
(2) odpowiedzi
2017-08-09 10:08 Rails - Use jsonb instead of associations. How to integrate it in nested forms? »
Say there's a users table with column 'other_details' as jsonb datatype. There are different types of users. other_details contain many details which ...
(0) odpowiedzi
2017-08-09 08:08 How can test elastic in rspec via docker »
I can not test with elastic search using docker, I have error: "Failure/Error: Elasticsearch::Extensions::Test::Cluster.start(host: "search:9200", nod...
(0) odpowiedzi
2017-08-09 04:08 rspec active record testing error on serialize »
i'am using rspec to testing my model that should serialize a json. btw this is show an error in my console this is my rspec require 'rails_helper' R...
(1) odpowiedzi
2017-08-08 20:08 ActiveRecord before-transaction callback »
Problem: I'm looking for an ActiveRecord (Rails 3.2) callback hook that will execute BEFORE a DB transaction has begun. If it doesn't exist (and I d...
(1) odpowiedzi
2017-08-08 18:08 Rails 4 ActiveAdmin CSV export yields "You are not authorized to perform this action." in browser »
I am using "out of the box" installations of Devise gem and ActiveAdmin gem in my Rails 4 project. I have an ActiveAdmin model that works fine as an i...
(1) odpowiedzi
2017-08-08 15:08 Rails_admin capistrano deploy error »
When I deploy my project i have some errors 00:19 deploy:migrating 01 ~/.rvm/bin/rvm default do bundle exec rake db:migrate 01 rake abort...
(0) odpowiedzi
2017-08-08 13:08 Algolia::AlgoliaProtocolError in rspec after gem upgrade »
I started receiving Algolia::AlgoliaProtocolError after upgrading from 1.17.0 to 1.19.1 Full stack trace is below. Failure/Error: @listing = Fact...
(1) odpowiedzi
2017-08-08 13:08 index is getting called instead of show »
I'm trying to write an API using Ruby on Rails. In my controller class index method is getting called instead of show. Although I am passing parameter...
(2) odpowiedzi
2017-08-08 10:08 URL Signing with AWS Cloudfront - Ruby »
My main purpose is to sign the URL using AWS Cloudfront in Ruby I Have created a key pair at https://portal.aws.amazon.com/gp/aws/securityCredentials...
(0) odpowiedzi
2017-08-08 02:08 RSpec transaction test persists changes to instance variable in before(:each) »
SO... I have a RSpec testing issue where I am attempting to configure a specific setup (without creating new data, but modifying instance data) and a...
(1) odpowiedzi
2017-08-08 01:08 How to use resource attribute on I18n Devise flash message »
I'm trying to use a resource attribute in one of my internationalized strings used by Devise. I've created a new SessionsController which inherits fro...
(2) odpowiedzi
2017-08-07 18:08 Rails 5.1: retrieve records for nested association with includes »
I'm trying to implement includes in has_many / belongs_to association similar to this example: class Author < ApplicationRecord has_many :books,...
(1) odpowiedzi
2017-08-07 17:08 Stringify error in rails »
I have this array of hashes: object = [ {:user_id=>9, :timesheet_project_id=>4, :timesheet_task_id=>87, :date=>"2017-08-23", :time_spen...
(1) odpowiedzi
2017-08-07 16:08 How To test in rspec if file is deleted? »
I would like to know how to test in rspec is specific file is deleted. Here is code that I am testing def check_status filename = File.join('test'...
(1) odpowiedzi
2017-08-07 16:08 Get all records that exist in both the tables »
Below are two tables with some sample data :- Uploads: id: 1 , file_ref:abc id: 2, file_ref: abc1 id: 4, file_ref: abc3 id: 5, file_ref: abc4...
(3) odpowiedzi
2017-08-07 16:08 How to find the keys which has false values? »
I have this array: @import = [{"User"=>[9], "Project"=>false, "Task"=>false, "Date"=>"2017-08-11", "Time (Hours)"=>2.0, "Comment"=>...
(3) odpowiedzi
2017-08-07 15:08 Rails 4 bulk updating array of models »
I have an array of ActiveRecord model and I want to renumber one column and bulk update them. Code looks like this: rules = subject.email_rules.order...
(2) odpowiedzi
2017-08-07 15:08 How to get latest comments from each post in Rails? »
I have a standard blog models, user, posts and comments. How can I query for 1 latest comment of each post of custom user? I know we can connect user...
(2) odpowiedzi
2017-08-07 14:08 delete files from Google Drive Service account with the google drive gem »
We created a synchronizer plugin for discourse and it should synchronize backups to the google drive service account. In order to keep the admin's goo...
(0) odpowiedzi
2017-08-07 10:08 How to replace Maptimize with markercluster in maps using solrRequest »
Please is there any way to replace maptimize with markerwluster in an old project. I spent so much time looking at the source code and i didn't find ...
(0) odpowiedzi
2017-08-07 09:08 How to use checkbox on form_with type »
<div class="field"> <%= form.label :course_type %> <%= form.check_box :ctype, {:id => "post_ctype"} %>checkbox 1 <%= fo...
(2) odpowiedzi
2017-08-07 04:08 Rails 3 - Splat attr_accessible with Active Record »
I'm making typedoptions dynamic by moving them to a new model, as you can see before I was using a constant to make the columns t_a, t_b, t_c accessib...
(1) odpowiedzi
2017-08-06 22:08 HTML FORM POST on Ruby on Rails project »
I have created a HTML form which works fine on my development and staging servers, however it is not working on the production environment. Staging a...
(1) odpowiedzi
2017-08-06 20:08 Unable to deploy rails app on Heroku. Postgresql not detected »
I have developed a rails app Todo List but when trying to deploy it on Heroku. I see the database needs to be changed to PostgreSQL. I tried with foll...
(0) odpowiedzi
2017-08-06 18:08 Rails: How to make recent blog posts appear first »
I'm creating a blog app with ruby on rails. I was able to allow a user to add posts, but on the top of the page, the posts that were created first app...
(3) odpowiedzi
2017-08-06 15:08 InvalidURIError when useing httparty post method and get the some field through users »
InvalidURIError (bad URI(is not URI?): https://api.flightstats.com/flex/schedules/rest/v1/json/from/VNS/to/DEL/departing/2017/ ...
(1) odpowiedzi
2017-08-06 14:08 Run a ruby on rails job every night at a specific time »
I have a job like this : class LdapSyncJob < ApplicationJob queue_as :default require 'pp' def perform users = User.all users.each d...
(1) odpowiedzi