Data dodania Pytanie
2017-04-14 10:04 Ruby on Rails - Activeadmin, different validation with the same model »
I did register the same Model twice with activeadmin : ActiveAdmin.register Media, as: 'Picture' do end ActiveAdmin.register Media, as: 'Video' do en...
(1) odpowiedzi
2017-04-14 09:04 Rails Rspec transaction fixture not working with multithread »
I'm trying to reproduce the racing condition problem with RSpec. I spent a day to searching around and so far I have: in my helper: def create_conc...
(0) odpowiedzi
2017-04-14 06:04 Display filename without extension with Carrierwave »
when i uploaded a file, my view page will display the file for example 'thisfile.jpg' how do i remove .jpg and all file extension from the displayed...
(1) odpowiedzi
2017-04-14 06:04 omniauth-facebook gem: request.env["omniauth.auth"] is nil »
I'm using the omniauth-facebook gem with devise. It was working until recently. I also recently upgrated to Rails 5.0.1 from Rails 4, but I'm not sure...
(1) odpowiedzi
2017-04-14 02:04 why cause undefined method `empty? on rails? »
I'm trying to loop on a related model and i have no idea why in the log is showing this undefined method `empty? Does someone have an idea why?...
(0) odpowiedzi
2017-04-13 23:04 jquery_datepicker not working with Rails 4 »
See the following repo for example project: https://github.com/aarona/date_picker At first I thought the problem was caused by the model being tablel...
(1) odpowiedzi
2017-04-13 22:04 Logging Query Type in Rails »
I want to log the query type(DDL,DML,etc.) in the log, while logging the query trace in Rails. I achieved the query trace logging by patching ActiveSu...
(1) odpowiedzi
2017-04-13 21:04 How to call methods dynamically based on time »
I am creating an automatic raffling system. I have a draw button that will run a draw function to select a winner or winners and it sends an email to ...
(3) odpowiedzi
2017-04-13 17:04 How to expect a message to be send to any instance of a class (twice total) with certain arguments in Rails? »
When refunding an order we need to deactivate the serials attached with that order. In the spec the order has two serials, ergo I must expect two call...
(2) odpowiedzi
2017-04-13 15:04 Rails 4: Maintain form inputs after validation »
I have a form on my Locations#show view for a different model (PotentialClient). When my form fails validations, the redirect empties all fields beca...
(1) odpowiedzi
2017-04-13 13:04 rails strong parameters not work correctly »
i have a rails app. i have strange problem in saving form this is my ticket model . class Ticket < ApplicationRecord belongs_to :user has_ma...
(1) odpowiedzi
2017-04-13 09:04 Spring REST oauth2 API + Ruby on rails 2.3.0 »
I am calling Spring rest oauth api from ROR with is giving response as follows { "access_token": "22cb0d50-5bb9-463d-8c4a-8ddd680f553f", "tok...
(0) odpowiedzi
2017-04-12 21:04 Rails 4.2.7 submit remote form's event triggering twice »
I am stuck in a question that seems well documented on forums (included Stackoverflow), but none of those topics could helped me to solve the issue. I...
(2) odpowiedzi
2017-04-12 19:04 How are Sprockets directives read in manifest file when using Rails? »
New to Rails so bear with me...I was looking at a manifest file (application.js) today while researching the asset pipeline and was curious how the di...
(2) odpowiedzi
2017-04-12 19:04 Setting up TestCafe with Rails backend and fixtures data »
I'm currently working on a Rails project that uses RSpec as the testing framework. We have different Rails fixture data that helps us test our UI when...
(1) odpowiedzi
2017-04-12 18:04 Rails 4 + Devise Invitable: Reset Password »
I have a user index and I want to add a button that would send a password reset email when I click it (for when users lose their invitation). # View ...
(1) odpowiedzi
2017-04-12 13:04 RSpec making 1000 posts »
I'm trying to execute a button click 1000 times(simulating 1000 posts) in RSpec. I'm writing a report about the website and I need some sort of perfor...
(0) odpowiedzi
2017-04-12 13:04 sort_link with Polymorphic Relationship + Ransack »
I have one polymorphic relationship class Offer < ApplicationRecord belongs_to :offerable, polymorphic: true end class Company < Application...
(0) odpowiedzi
2017-04-12 11:04 How to make a recursive mkdir with Rails SFTP? »
Is it possible to create multiple level directories like /2017/04/11/ on a FTP Server via sftp.mkdir! "/2017/04/11"? It returns Net::SFTP::StatusExce...
(0) odpowiedzi
2017-04-12 11:04 OAuth2 Error during facebook authentication in Rails »
In development mode, during the authentication callback phase from localhost/auth/facebook, I am faced with the following error OAuth2::Error : ...
(1) odpowiedzi
2017-04-12 04:04 Rails enum symbol vs string »
I have just started working on a new rails project, and I have noticed that the previous developer has used strings instead of symbols as keys for the...
(1) odpowiedzi
2017-04-12 04:04 Is there a better way to calculate the total value of this invoice model? »
I have an Invoice model that has a has_one relationship to another Cart model, Cart has_many line_items and each line_item has a product with a price...
(1) odpowiedzi
2017-04-12 04:04 A better way to get ActiveRecord table's primary tables(belongs_to' tables) array »
I have a table with many fields [ [ 0] "id", [ 1] "type", [ 2] "title", [ 3] "delivery_fee", [ 4] "price", [ 5] "starting_pri...
(1) odpowiedzi
2017-04-12 00:04 handling a webservice responce with ror »
I am collecting a response from a web service in a Rails' app with response = #api.sql_data This causes response to equal the following. respo...
(2) odpowiedzi
2017-04-11 23:04 datatables colreorder and then disable user reorder »
I am ordering the column headers when the data table loads through the colReorder attribute. var table = $("table#"+id+".data-table").DataTable({ ...
(0) odpowiedzi
2017-04-11 22:04 QUERY: where has_many association does not contain specific value »
I have two models Invoice and InvoiceEvent Invoice has many InvoiceEvents InvoiceEvent has a field state I'd like to write a query to find all Invo...
(1) odpowiedzi
2017-04-11 20:04 Why am I getting ActionController::UrlGenerationError: "No route matches" in my controller spec? »
I have a controller spec looking like this: # config_controller_spec.rb require "spec_helper" describe Api::V4::ConfigController, type: :controller ...
(1) odpowiedzi
2017-04-11 17:04 Exception reentered: When saving polymorphic association »
In my Rails 4.2.7, ruby 2.3.3 App, when I save a particular polymorphic association by saving a nested form it gives stack level too deep error and ra...
(1) odpowiedzi
2017-04-11 17:04 Dygraphs not rendering after Rails 4 upgrade »
Recently upgraded an old Rails 3 app to the last version of Rails 4. No changes made on dygraphs gem config, nor files, etc. But graphs are not displa...
(0) odpowiedzi
2017-04-11 16:04 How can I nicely print a formatted exception that I catch in a rescue block? »
I'm using Rails 5 (Ruby 2.4). I have a block of code that catches an exception and prints out, what I thought was a stack trace ... begin ...
(2) odpowiedzi
2017-04-11 14:04 SSL with a legacy rails project »
I'm trying to add SSL to a legacy rails project (rails 2.3.15, ruby 1.8.7). I'm a little out of my comfort zone in all honesty as a very junior java d...
(0) odpowiedzi
2017-04-11 14:04 Rails API Server RSpec test always returns empty JSON »
I have a problem with testing my Controllers. All tests are working fine, the Controllers are basic CRUD, but one #index action always returns an empt...
(1) odpowiedzi
2017-04-11 11:04 Specs pass when run alone, but fail when full suite is run »
I have some specs that pass when run individually. But when run as the whole suite (or as the whole spec file), only the first passes, while the other...
(1) odpowiedzi
2017-04-11 10:04 Rails STI associations and nested attributes »
I have a structure like the following: class Order < ApplicationRecord end class BulkOrder < Order has_many :vehicles, inverse_of: :order ...
(1) odpowiedzi
2017-04-11 08:04 How to set up Token Authentication properly in Rails? »
I am trying to make an API for a project. I followed instructions from this video - https://www.youtube.com/watch?v=lgdUqtw4weg&t=165s Basically ...
(1) odpowiedzi