Data dodania Pytanie
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
2017-11-30 11:11 How to create time intervals between specific publications in rails? »
I try to build a recipes web app. It is a kind of “game”. Each user have the possibility to like a recipe. At first, this one appears empty. And t...
(2) odpowiedzi
2017-11-30 07:11 While trying to use Dropbox for creating a shared link for my file I always get the error »
Bad Input: Error in call to API function "sharing/create_shared_link": request body: could not decode input as JSON I have created an App Folder and ...
(0) odpowiedzi
2017-11-30 05:11 ActiveModel Serializer - Passing params to serializers »
AMS version: 0.9.7 I am trying to pass a parameter to an ActiveModel serializer without any luck. My (condensed) controller: class V1::WatchlistsC...
(3) odpowiedzi
2017-11-30 00:11 Rspec/Capybara checking concatenated string of entire content of page, for expected string »
I am testing the process of editing products in a rails app. The process is working as expected on my site and all other similar specs are passing. In...
(1) odpowiedzi
2017-11-29 23:11 Rails 4 - response.cache_control vs. response.headers['Cache-Control'] »
Rails 4 Caching Bug/Issue Running: Heroku (although I experience issue locally) Rails 4.1.14.2 The other day I noticed that on my production rails a...
(0) odpowiedzi
2017-11-29 22:11 selecting username using current_user in devise »
I read that the helper current_user can be called in the view. So I have something like this <h1> Customer id <%= User.select(:username).fi...
(1) odpowiedzi
2017-11-29 21:11 Ruby Bundler Version Dependency Confusion in Lockfile »
I will try and keep this focused. When trying to move from a working bundler 1.14.6 combined with a Gemfile + Gemfile.lock to 1.15.2 or higher I ran ...
(0) odpowiedzi
2017-11-29 21:11 Rails has_many :through with namespace - uninitialized constant »
I'm having some trouble defining a has_many :through relationship in Rails 5 where the join and target models both reside within a namespace. I have a...
(1) odpowiedzi
2017-11-29 19:11 Rspec test failing in docker but passing locally - present? method is funky »
describe '#generate_authorization' do it 'creates document authorization' do loan.generate_authorization(admin) expect(Document::Authorizat...
(0) odpowiedzi
2017-11-29 16:11 Rails 5 Migration Data Type Issue »
I originally developed my rails 5 application using PostgreSQL. I had to change over to a MariaDB after I had done all of my development due to some i...
(1) odpowiedzi
2017-11-29 16:11 user is not sign in as devise user when authenticated from omniauth facebook? »
I have integrated the omniauth-facebook in my application to authenticate the user. It is working fine but there is one problem that user is not sign ...
(0) odpowiedzi
2017-11-29 14:11 Callback not saving value »
I am writing some tests for a relatively complicated action that I need to occur when a record is destroyed. These are my CheckIn functions and a C...
(1) odpowiedzi
2017-11-29 12:11 Slick GoTo with custom slider navigation won't work »
I created a slider with a custom slider navigation. Here is the code looks like: <!-- Slider Parent --> <div class="col-md-6 col-xs-12"> ...
(1) odpowiedzi
2017-11-29 10:11 ActiveRecord override has_many relation »
So i'm trying to override a relation has_many in a rails 4.2 application. I've a model Event who has_many :picturables. The Event can also has_one :...
(0) odpowiedzi
2017-11-29 07:11 Ruby: What does binds mean in ActiveRecord gem? »
I saw binds as argument in lots of methods, but without any documentation. e.g. Rails Source code def find_by_sql(sql, binds = [], preparable: nil,...
(1) odpowiedzi
2017-11-29 05:11 Connection reset error while uploading video on S3 bucket »
I want to upload large video in s3 using s3_multipart rails gem. I've added below CORS Configuration in AWS S3 bucket and change permission as everyon...
(0) odpowiedzi
2017-11-29 04:11 Passing date parameters to a sql select query in rails (QueryMethods) »
I am working with the brakeman gem (which identifies possible security issues in Ruby on Rails code). We have a scope which uses joins, group and sele...
(2) odpowiedzi
2017-11-29 01:11 Serving Unity3D game through web »
I've been assigned the task to serve a Unity3d game in my website (designed by someone else). They're flexible on serving the game directly from the w...
(1) odpowiedzi
2017-11-28 23:11 Ruby, query active model dynamically »
I have an Order model in my ruby on rails application which has several attributes. I want to query those orders according to parameters given by user...
(1) odpowiedzi
2017-11-28 22:11 Add attribute to Rails 5 model, which not exists in the database »
I have tables - users and articles. It is one to many relation or user can have many articles. What I want is to select all users from users table wit...
(2) odpowiedzi
2017-11-28 19:11 Why do I get Active record relation instead of Array in rspec? »
I'm running tests on Post: expect(subject.query).to eq [previous_post, post, future_comment] But I get this error : expected: [#<Post id: 3, bo...
(2) odpowiedzi
2017-11-28 15:11 Add filter after Devise authentication »
I need to add around_action :set_time_zone (or before_filter :set_time_zone) to the application controller. The problem is that the current_user is al...
(1) odpowiedzi
2017-11-28 15:11 Rails how to get entries where we ignore deleted_at property along with other properties »
I have the model Store. I would like to check an existence of an entry in the database by Store.where(:google_place_id => 'XXXX'). I just want to c...
(3) odpowiedzi
2017-11-28 14:11 how to print user_id using the devise gem »
I currently trying to do something like this in the applicaiton.html.erb <h1> <% print "Customer id #{current_user}"%> </h1> but...
(1) odpowiedzi
2017-11-28 08:11 Using the id of subject{create()} in rspec »
I'm pretty new to rspec so I'm not sure how to word this properly so I'll give an example of my situation instead: subject(:test) { SomeModel.create(...
(0) odpowiedzi
2017-11-28 07:11 can't see tables in specific database using rails console »
In my case. I have use two different databases in my single application. One is mysql and another one is sqlsever. ActiveRecord::Base.connection.tab...
(2) odpowiedzi
2017-11-28 07:11 Ruby error : undefined method `any ' for 30:Fixnum (NoMethodError) »
I am trying to list the product reviews in spree back end. But getting the error 'undefined method any '. I am new to ruby,please help me to solve thi...
(2) odpowiedzi
2017-11-28 05:11 How to import ruby RSpec data »
Can someone please show how to directly import ruby RSpec data . I haven't found a single answer to this after hours of research. I'm trying to retu...
(1) odpowiedzi