Data dodania Pytanie
2017-06-12 23:06 My User_id is updated to nil every time I refresh my page in Rails »
I know what is causing this issue, but can't find the working alternative of it. I will describe the problem and hope for a good answer. So, I have ...
(0) odpowiedzi
2017-06-12 18:06 Why am I getting error "#let or #subject called without a block"? »
I wonder how to pass code to shared examples. I have these specs (snipped) let(:property) { subject.send(type) } context 'when one or both depe...
(0) odpowiedzi
2017-06-12 17:06 Getting all users from db that participated for an activity »
I am currently facing the following problem: Users are able to create activities. Other users have the possibility, to participate the activity. I now...
(1) odpowiedzi
2017-06-12 17:06 ruby on rails extending module in class instance »
using ruby 2.2, rails 4.1 I have a search result class that I would like to use to format the correct results depending on the type of search, ie ful...
(0) odpowiedzi
2017-06-12 16:06 RSpec working on Mac but not Windows »
I'm trying to run a very simple RSpec script on Windows, however whenever I use the command rspec <filename>.rb the command prompt just prints a...
(0) odpowiedzi
2017-06-12 15:06 create time steps array in ruby on rails in 30 or 60 minute increments »
I am creating a simple appointment keeper in Rails 4, and I need to create an array of times for the user to choose between a min/max. The user can a...
(1) odpowiedzi
2017-06-12 08:06 How do I get the whole error backtrace for rspec? »
Currently I am using parallel tests rspec allure 0.8.0 After I run the tests I get the following error: RSpec::Core::MultipleExceptionError I n...
(1) odpowiedzi
2017-06-12 07:06 Ruby default assignment ( ||= ) vs Rescuing error »
Since a ||= 1 is equivalent to a || a = 1, one can state that this is synctactic sugar for this: if a.nil? a = 1 end Likewise, given that session...
(3) odpowiedzi
2017-06-12 03:06 ActionController::InvalidAuthenticityToken in Rails 5 »
I'm getting ActionController::InvalidAuthenticityToken in rails 5. It was working correctly for a while, and then just gave up working. # Applicatio...
(3) odpowiedzi
2017-06-11 21:06 Is Regexp.new(user_input) in ruby secure? »
Is it secure to create Regexp object from user-provided query directly, or do I need to do some validations on it first? Documentation doesn't say muc...
(1) odpowiedzi
2017-06-11 19:06 Subscription class not found 'MyChannel' in ActionCable »
I am facing a problem while working with Action Cable, whenever I run my program I receive an error that says Subscription Class not found Conversatio...
(2) odpowiedzi
2017-06-11 18:06 Receiving error when working with selenium-webdriver. Unable to find mozilla geckodriver »
I am following a tutorial on how to use RSpec with Ruby. We are learning how to work with webdriver, however I am receiving an error when I try to run...
(1) odpowiedzi
2017-06-11 03:06 How can I return nil instead of an error from a missing hash key? »
I have a hash, and I'm looking for a certain key inside it. But sometimes hash itself can be nil. In this event, I don't want hash["key"] to return an...
(4) odpowiedzi
2017-06-11 03:06 Ruby on Rails Best Design Pattern Instead of Single Table Inheritance? »
I'm a junior developer working on a new Rails App and need some assistance in deciding which design pattern is best to use to model different types of...
(1) odpowiedzi
2017-06-10 19:06 Ruby 2.4.1 - warning: constant ::Fixnum is deprecated »
I'm new to StackOverflow and Rails, so I am hoping this is not too naive a question. I am trying to run my application locally using bin/rails server....
(1) odpowiedzi
2017-06-10 05:06 Sinatra endpoint is working perfectly on localhost, but not found in production? »
I have a weird issue i'm unable to troubleshoot, I get a 404 response body of <h1>Not Found</h1> from my sinatra API when deployed on h...
(1) odpowiedzi
2017-06-10 04:06 How is the best way to refactor a long string line in ruby? »
I have a line of code like this "#{envelope_quantity} - envelope #{Budget::util_name(envelope_size)} #{Budget::util_name(envelope_paper)} #{Budget::u...
(3) odpowiedzi
2017-06-10 03:06 Does rbenv work along/overrides or conflict with an apt installed ruby? »
Does rbenv work along,overrides or conflict with an apt installed ruby - and what are the implications for apt-packages that depend on ruby. ...
(1) odpowiedzi
2017-06-09 21:06 if statement after variable assignment - how common? »
I was recently discussing the following Ruby syntax with a colleague: value = if a == 0 "foo" elsif a > 42 "bar" ...
(2) odpowiedzi
2017-06-09 14:06 How to check user input against pattern? »
In my Ruby on Rails application I need to check user input against patterns consisting of letters, numbers and a few special characters (like dashes a...
(5) odpowiedzi
2017-06-09 13:06 rails query not in statement formatting correct »
I do this: check1 = inquiries.select("question_id").where(:membership_id => self.id) This returny a active Record array with entries like th...
(2) odpowiedzi
2017-06-09 13:06 Use joins for condition over each specific record - rails »
I'm new to rails and stuck in between when I'm facing this situation: I have a Car model, Location Model and a Ride Model and relationships like as:...
(1) odpowiedzi
2017-06-09 12:06 how to fetch WordPress Data Base Table via Ruby script with dynamic active record classes? »
I currently have a website that is built in WordPress, and have over 1000 customers registered. Would I be able to extract the information from the Wo...
(1) odpowiedzi
2017-06-09 07:06 WebMock stub data from Aws CognitoIdentityProvider »
I have the following module in a Rails controller concern: module AwsAuth extend ActiveSupport::Concern require 'aws-sdk' def get_cognito_use...
(1) odpowiedzi
2017-06-09 00:06 Asynchronously set rails authenticity token »
I have a page that is cached at the CDN level that I would like to have a form submission on. I have followed technique 3 of this post in order to as...
(1) odpowiedzi
2017-06-08 17:06 How can I check that my automatic deployment worked correctly? »
I'm deploying a sinatra application automatically via git hooks. What are some general tests I can run during deployment to make sure deployment goes ...
(0) odpowiedzi
2017-06-08 13:06 Wicked PDF: How to remove top margin from COVER page? »
I'm generating pdf's from html using wicked_pdf. Right now, I want to remove top margin on the first/cover page . This is a snipped code from my cont...
(0) odpowiedzi
2017-06-08 07:06 Paperclip image not showing, unpermitted params and routing error »
I'm trying to display images on the homepage with paperclip and I have unpermitted params and a routing error. I have tried various solutions includin...
(1) odpowiedzi
2017-06-08 01:06 Accurately measuring rspec/capybara testing time? »
I'm trying to speed up tests and so far have done things like remove unnecessary database writes (using new instead of create and not using factorygir...
(1) odpowiedzi
2017-06-08 01:06 How do I use Selenium Webdriver on headless Chrome? »
I'm learning to use Selenium for basic things like taking a screenshot, scraping, and testing and would like to use it with headless Chrome, which is ...
(1) odpowiedzi
2017-06-07 22:06 Usage of _path gives a "No route matches.." error »
I am following a tutorial of Rails and I have a few pages that I am adding some tests for. I am trying to use help_path instead of :help in my pages_...
(1) odpowiedzi
2017-06-07 19:06 How to scrape non-standard HTML with Nokogiri »
How can I unpack a non-standard HTML: <body> <div class="open"> <div style='style'>Raw name 1</div> <p...
(2) odpowiedzi
2017-06-07 17:06 FactoryGirl build has_many through associations »
Is it possible to build associations that have a has_many through association in ActiveRecord? Example: I have a user that has team_memberships asso...
(0) odpowiedzi
2017-06-07 16:06 unable to redirect to a custom action in devise registrations controller »
Excuse me for the noob question. I have a devise users model and i want to save additional data to the users model after a user signs_in/signs_up. r...
(1) odpowiedzi
2017-06-07 14:06 Ruby on Rails Michael Hartl chapter 9 Test fails »
I was finishing up Chapter 9 from the RoR Tutorial and I was running the last test and a Failure showed up from the code which ran green in the previo...
(1) odpowiedzi