Data dodania Pytanie
2017-03-18 23:03 How do I update a postgres boolean field using Active Record in Rails 5? »
I created a join table like so: class CreateJoinTablePurchaseUser < ActiveRecord::Migration[5.0] def change create_join_table :purchases, :u...
(1) odpowiedzi
2017-03-18 21:03 Adding Rails tests to an app with datatables »
I have a Rails app with datatables: https://github.com/rweng/jquery-datatables-rails https://github.com/antillas21/ajax-datatables-rails I am goin...
(0) odpowiedzi
2017-03-18 21:03 How can I implement Whatsapp life QR code authentication »
How can I create a dynamic QR code on a rails app such that the moment it is scanned and successfully processed, the open page bearing the QR code can...
(2) odpowiedzi
2017-03-18 20:03 rails check if url ends with number »
I am trying to create a redirect_to :back that is triggered after a person object is deleted. There are several pages a user can come from before tri...
(1) odpowiedzi
2017-03-18 19:03 Twitter-Like "Reply and Retweet" Rails 3 »
I'm building a sample rails application that mimics some of my favorite apps. I want to implement a photo reply to a photo and a repost of a photo -- ...
(1) odpowiedzi
2017-03-18 15:03 Send Email to Multiple Recepients in Ruby on Rails »
I want to send Email to Student and Guardian. I have 3 tables Student,Guardian and Users. The Student and Guardian are also in User table. But when i ...
(0) odpowiedzi
2017-03-18 14:03 Admin user allow to delete and edit other users »
I have a problem with my users-controller. Currently, an admin user can delete itself, other users can not delete themselves. In addition, each user c...
(1) odpowiedzi
2017-03-18 10:03 Getting ProgramLimitExceeded: ERROR from order_as_specified gem »
I am using order_as_specified gem, to order my records in a custom order reach_order = [3,1,67,43,...] influencers = Influencer.order_as_specified(id...
(0) odpowiedzi
2017-03-18 06:03 graphql-ruby, rails generate graphql:install doesn't work »
When I run rails generate graphql:install, it throws errors, even I already gem install graphql and graphql-relay. These are the error messages. Run...
(1) odpowiedzi
2017-03-18 00:03 Configuring ActionCable with Elasticache for Rails 5.0 App on Elastic Beanstalk »
I have created a Rails 5.0 app with Elastic Beanstalk on Amazon Web Services and I have been able to successfully create the website with a functionin...
(0) odpowiedzi
2017-03-18 00:03 Rails is not sending custom metrics to NewRelic »
I'm trying to send custom metrics to NewRelic insights, but unfortunately it is not working for my Rails app that is currently sending default data to...
(1) odpowiedzi
2017-03-17 22:03 Ruby: Iterating through dir's and files »
I wrote the following script to iterate through a directory, it's subdirectories and their files: def self.search_files_in_dir_for(dir, strings) ...
(1) odpowiedzi
2017-03-17 21:03 Rails form object with reform-rails with collections not working or validating »
I am using the reform-rails gem In order to utilize a form object in my rails project. I realize a form object is probably overkill for the example...
(2) odpowiedzi
2017-03-17 19:03 Why aren't my assets rendering in Rails 4? »
I've been working on a Rails app to conglomerate directories pulled from IPFS. For some reason, app/views/layouts/application.html.erb isn't rendering...
(1) odpowiedzi
2017-03-17 18:03 Rspec / Capybara clicking on button that was generated using javascript »
I have a generated a button with javascript: <script> var button = document.createElement("button"); button.innerHTML = "Do Something"; ...
(1) odpowiedzi
2017-03-17 17:03 Is there an inverse of it_behaves_like in Rspec? »
Is there something to the effect of 'it_doesnt_behave_like' or 'group_will_fail_with(SomeError)'? I don't see anything in the docs, but I feel like t...
(0) odpowiedzi
2017-03-17 16:03 Rails Form Object with Virtus: has_many association »
I am having a tough time figuring out how to make a form_object that creates multiple associated objects for a has_many association with the virtus ge...
(2) odpowiedzi
2017-03-17 16:03 Can't access object of class nil Rails 4 »
I get this errormsg from doing tests in Rails 4 Error: ArticlesControllerTest#test_x: ActionView::Template::Error: undefined method `state' for nil:N...
(1) odpowiedzi
2017-03-17 15:03 How to test that a request does not return 500 error? »
I am trying to create an RSpec test which detects if a request can crash the controller, usually a 500 error. So I want to be able to distinguish betw...
(2) odpowiedzi
2017-03-17 14:03 Redirect to page with form fields filled »
I have two models in my application: class User < ActiveRecord::Base has_many :telephones end class Telephone < ActiveRecord::Base belong...
(0) odpowiedzi
2017-03-17 11:03 How it works find_by_* in rails »
May be its weird for some people about the question. By looking at the syntax its identifiable as class method. Model.find_by_* So if its class met...
(2) odpowiedzi
2017-03-17 10:03 How to run system command on heroku server? »
I am using OGR2OGR for converting geojson file into dxf format. It is working on local server but on heroku server it is not working. Find code which ...
(1) odpowiedzi
2017-03-17 10:03 rails s says "brunch_watcher.rb:1:in `require': cannot load such file -- pty (LoadError)" in RailsInstaller »
I installed breakfast in my rails project on Windows 10 PC. When I run rails s and it throw exception D:/Development/RailsInstaller/Ruby2.3.0/lib/rub...
(0) odpowiedzi
2017-03-16 23:03 How to run rails commands in production with capistrano 3 and rvm installed »
I'm struggling to get a decent understanding of capistrano. I want to run rails commands in production but it seems that the corresponding binstub is ...
(1) odpowiedzi
2017-03-16 22:03 Capybara Unable to find field »
Hello I am doing my very first tests and I would need your help. I am using Rails5. The problem is because of the nested fields I believe...(used Co...
(1) odpowiedzi
2017-03-16 21:03 .last method working weirdly rails »
I have an Model named Page class Page < ApplicationRecord has_many :details, dependent: :destroy end and Detail class Detail < Application...
(0) odpowiedzi
2017-03-16 21:03 Your user account isn't allowed to install to the system RubyGems »
I am running the command bundle install in a project folder. In some project folders it will produce an error and in other projects folders it will...
(1) odpowiedzi
2017-03-16 21:03 How to dynamically switch text or button from follow to Un-follow using Ajax? »
All, I have a function within my controller that I am calling directly. However, once it executes I would like it to change to either follow or un-fol...
(1) odpowiedzi
2017-03-16 19:03 ActionController::API in Rails 4 application with both API and Web views »
I have a Rails 4.2.7 application with both web views and a JSON API. There are separate base controllers for web views and API. I'd like the API base ...
(0) odpowiedzi
2017-03-16 18:03 Weird error when testing a Rails + AngularJS app with Rspec and PhantomJS »
I have an app that lists tickets. It uses AngularJS. Here's the controller action: def index @tickets = apply_scopes(@tickets) response.headers['...
(1) odpowiedzi
2017-03-16 17:03 Single or Multiple logger instance in a web project »
I'm work on build a log system in my project, which is a Ruby Web App base on Sinatra, similar with Rails. I've referenced a lot of logging framework...
(1) odpowiedzi
2017-03-16 16:03 Rails 3 switching to strong parameters ForbiddenAttributesProtection error not raised? »
I'm attempting to add strong parameters to a Rails 3 application, but it is still permitting all mass attribute assignment and doesn't raise an error ...
(0) odpowiedzi
2017-03-16 12:03 Replace until all occurences are removed »
I have the following strings: ",||||||||||||||" ",|||||a|||||,|" I would like to achieve that all occurrences of ",|" are replaced with ",," The o...
(4) odpowiedzi
2017-03-15 22:03 Rails Query Active Record By Pairs OR'ed »
I have an API that looks like... get(not_unique_id:, pairs: []) ...where pairs can look like [{ foo: 1, bar: 'a' }, { foo: 2, bar: 'b' }] and I wan...
(1) odpowiedzi
2017-03-15 19:03 How to fix aborting Fibonacci sequence code »
I am trying to get a Fibonacci sequence of 5 million elements. This code aborts abnormally, when I pass 1000 as a parameter. def self.fibo_seq(limi...
(4) odpowiedzi