Data dodania Pytanie
2017-12-04 12:12 Rubocop, Rails and Rspec »
I'm using this configuration in .rubocop.yml: # inherit_gem: # rubocop-rails: # - config/rails.yml require: rubocop-rspec AllCops: DisplayCop...
(0) odpowiedzi
2017-12-04 12:12 Test case is freezing my system »
I am trying to run one test case and it is freezing my system. I am not able to figure it out. It is not even giving me an error, just freezing my sys...
(1) odpowiedzi
2017-12-04 09:12 Sending nested JSON from rails app to hapijs app »
I'm using rails 3.4, node 9, and Hapi js 16.5.2 What i'm trying to do is send a nested JSON from a rails app to a hapi js app, but something weird i...
(1) odpowiedzi
2017-12-03 17:12 RoR - redirect_to undefined? »
currently doing an tutorial and ran into an issue with redirect. Rails prints out the following message: undefined method ` redirect_to' for #<P...
(1) odpowiedzi
2017-12-03 17:12 Rails locales have messed up named routes in rspec »
I just decided to add multiple languages to my rails app. I've wrapped my routes with this scope "(:locale)", locale: /#{I18n.available_locales.joi...
(0) odpowiedzi
2017-12-03 12:12 PDF editing gem for ruby on rails app »
I have a rails app in which user submits a PDF file. I want to edit that PDF file such that i can have line numbers on each line in it. Is there any g...
(1) odpowiedzi
2017-12-03 09:12 Product and Category relationship »
Trying to have following relationship in my application. Product can belong to many categories, sub categories and sub sub categories. Current desig...
(1) odpowiedzi
2017-12-03 05:12 Iterating through array gives full array of items at the end »
I am trying to iterate through a set of records. However, at the end of the iteration, rails displays the full array. <%= @portfolio_item.technolo...
(1) odpowiedzi
2017-12-03 03:12 noMethodError in Property#new »
I am having a bit of an issue to find where this error is coming from. I am getting this error: I am not sure, it the issue has to do with the nam...
(1) odpowiedzi
2017-12-02 19:12 Filter by self-referencing association in CanCanCan rules »
In my project I have a Post class, which could be a comment to an other Post with a self-join. Beside other rules, I want to enable Posts which belong...
(0) odpowiedzi
2017-12-02 19:12 Image source not being read/found (rails) »
I have a very simple view page, and for some reason, it is not grabbing my images. At first I thought there was something wrong with my routes to my ...
(1) odpowiedzi
2017-12-02 19:12 Devise gem registration model issue »
I have an age check for my users in which if they want to sign up for my app, they have to be a certain age. I am using the devise gem, but created a...
(1) odpowiedzi
2017-12-02 18:12 InvalidAuthenticityToken, Ajax, Rails 5 with Device »
I am using Ajax authentication with Rails 5 and Devise. The table users has column blocked and if the user is blocked he will be logged out. I have se...
(1) odpowiedzi
2017-12-02 13:12 Cannot create FactoryGirl's factory for model »
I have this situation with legacy project. Suppose I have rails model: rails g model entity name:string In that model there is MAIN_ENTITY constan...
(1) odpowiedzi
2017-12-02 10:12 Search within activeRecord relation ruby on rails »
This is my controller code @users = User.all Inside view I have a drop-down from which I select a user. I want to show details of that users before...
(2) odpowiedzi
2017-12-02 06:12 Ahoy Top Events By Hash Property »
I am trying to find the proper way to get the top 5 (by count) events in a database based on a particular property in the events ("value"). I am also ...
(0) odpowiedzi
2017-12-02 05:12 Whenever gem how to work on windows system? »
Gemfile gem 'whenever', '~> 0.9.4',:require => false config/schedule.rb every 55.minutes do runner "DailyAttendance.fetch_data" end ...
(0) odpowiedzi
2017-12-02 03:12 Mysql error on sql like operator rails »
I get an error Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right...
(1) odpowiedzi
2017-12-02 00:12 Rails 3 serialized hash values saving but not persisting »
I have a model with a serialized text column. When I save and reload the record, the values seem to persist but when I query the record the values are...
(1) odpowiedzi
2017-12-01 22:12 How do I mock a class using Rspec and Rails? »
I'm using Rails 5 with Rspec 3. How do I mock a class in my Rspec method? I have the following class require 'rails_helper' describe CryptoCurrenc...
(2) odpowiedzi
2017-12-01 22:12 Rendering an Action's Template from Another Controller »
I'm working on a porject that has the following design forums have posts which have comments. I am reading the ruby guidance http://guides.rubyonrails...
(1) odpowiedzi
2017-12-01 20:12 Globilize updates all translations, except the 'title' »
I'm using Globalize 3.1 and globalize-accessors on an old rails 3.2 project, in order to store some translated fields, in 3 languages. I have two mod...
(1) odpowiedzi
2017-12-01 17:12 No operator matches the given name and argument type in pg backed rails app »
First I implemented a sample search functionality a rails app using SQLITE as the database. And the query was as follows: @productions = Production....
(1) odpowiedzi
2017-12-01 17:12 How to test a Bootstrap linked glyph in spec »
I'm trying to find a clean way to write a view test in Rspec that contains the following elements: <a href="/things/2/widgets"> <span clas...
(1) odpowiedzi
2017-12-01 14:12 How to send an email to array of emails using sendgrid-ruby gem? »
I am trying to use the sendgrid-ruby gem to send one email to say 1000 email addresses using one API call, I am not able to find how to pass an array ...
(0) odpowiedzi
2017-12-01 14:12 Filtering by categories with rails »
I have 2 models Recipe and Category, they associated with has_and_belongs_to_many, now I need to filter recipes by categories, when user checks catego...
(1) odpowiedzi
2017-12-01 11:12 How do I post json data in an rspec feature test powered by Capybara »
Short question I need to post JSON in feature tests, something like in my controller tests: post '/orders.json', params.to_json, format: :json But...
(1) odpowiedzi
2017-12-01 08:12 ActiveRecord AVG calculation »
I have request: Model.group(:p_id).pluck("AVG(desired)") => [0.77666666666666667e1, 0.431666666666666667e2, ...] but when I ran SQL SELECT AVG...
(2) odpowiedzi
2017-12-01 06:12 Rails ActiveSupport::Concern and method evaluation »
I have this application which uses Devise with current_user helper. When I create a module, current_user becomes nil after I mention an attribution to...
(1) odpowiedzi
2017-12-01 05:12 rails ckeditor not working with turbolinks »
I just installed the ckeditor gem in my rails app that is currently using and turbolinks. I installed the gem according to the instructions https://gi...
(0) odpowiedzi
2017-11-30 23:11 How to properly do model testing with ActiveStorage in rails? »
I have just switched to using ActiveStorage on rails 5.1.4 and I am new to TDD and struggling to figure out how to test a model that has_one_attached ...
(1) odpowiedzi
2017-11-30 18:11 Why does my associated object not save? »
(Rails Newbie here) I have two models Usuario and Ficha. Usuario has a has_one association with Ficha. Here are my models: class Ficha < Applicat...
(2) odpowiedzi
2017-11-30 17:11 Complexity Class for a Wildcard MySQL Search »
I have two mysql tables. In one table is the actual data (of a product for example) and in another are tags. Each product can have an unlimited amount...
(1) odpowiedzi
2017-11-30 14:11 Rails - Sagepay - Forcing sandbox mode for transactions »
Question as above. I've a form submitting a transaction and I'm trying to use it in sandbox mode to test. Whenever I submit the test details on the si...
(0) odpowiedzi
2017-11-30 14:11 how to check a record if it exists in another database »
ok so I am using devise and I created devise user, In a new migrate I added two cloumns to the users table as follows: add_column :users, :userNu...
(0) odpowiedzi