Data dodania Pytanie
2017-10-01 23:10 Gems not installing for JRuby when selected through chruby due to timeout »
I've been having an issue when trying to install Bundler for either JRuby 9.1.5.0 or the latest 9.1.13.0, when enabled through chruby as discussed her...
(0) odpowiedzi
2017-10-01 15:10 Computing ActiveRecord nil attributes »
In my Rails app I have something like this in one of the models def self.calc columns_to_sum = "sum(price_before + price_after) as price" where('...
(2) odpowiedzi
2017-10-01 12:10 Why I still can use Capybara method inside Rails Rspec Type Request »
According to Rspec Request Specs Capybara is no longer supported in request specs as of Capybara 2.0.0. Why I still can use Capybara methods fro...
(1) odpowiedzi
2017-10-01 10:10 One line custom validation »
In a Proc I would like to validate that the provided statement returns true. I tried the following: validate :home, Proc.new { |c| c.home.kitchen.pr...
(1) odpowiedzi
2017-10-01 10:10 Rails : how to use Jruby instead of the native Ruby on MacOs »
I am trying to use Jruby in mac. I see that there is Ruby already installed in usr/bin I like to use my custom jruby rather than the default ruby ins...
(0) odpowiedzi
2017-10-01 08:10 Why is Rails unpermitting its own automatically set parameters? »
My Login just broke. It worked just fine up to now, but now I get: "unpermitted parameters". Started POST "/login" for ::1 at 2017-09-30 20:29:47 +0...
(1) odpowiedzi
2017-10-01 04:10 Rails 4.2.1: Cannot create record »
today I tried creating a new model like usual I created my controller first: rails g controller Newsletters Then I created my model: rails g model...
(1) odpowiedzi
2017-10-01 00:10 I18n configuration under config/application.rb is ignored »
I am trying to setup Internationalization in my app. I have setup config/application.rb as follows: class Application < Rails::Application ...
(1) odpowiedzi
2017-09-30 16:09 'deploy:link_shared_paths' causes invalid symlinks when deploying Rails 4 app with mina »
I have a Rails 4 app that is running on two identical servers. I am using mina and when I run mina deploy SERVER="ip address" it works just fine. ...
(0) odpowiedzi
2017-09-30 09:09 Anyone can explain rails utility classes or share link in which anyone exlpain rails utility classes in detail »
I want to use utility classes in rails.But in rails guide i did not find description about rails utility classes. I don't know how we use in rails. Ho...
(0) odpowiedzi
2017-09-30 07:09 Rspec can't reproduce failures not even with minimal reproduction commands from bisect »
We use Travis CI to maintain our project on git. The issue here is on Travis we have 2 processes running a random selection of specs each with differe...
(1) odpowiedzi
2017-09-30 07:09 Already login How to override user session + devise + rails »
I am using Devise for authentication. I am already login to site.After login creating user and company. How can I destroy current session and create a...
(1) odpowiedzi
2017-09-30 02:09 Rails, edit action does not populate the form correctly with many instances of the same model »
I'm new to Rails and I'm doing my first project. Also english is not my native language so bear with me please. The problem I'm having is that I have...
(3) odpowiedzi
2017-09-29 19:09 locking rows on rails update to avoid collisions. (Postgres back end) »
So I have a method on my model object which creates a unique sequence number when a binary field in the row is updated from null to true. Its impleme...
(0) odpowiedzi
2017-09-29 16:09 Random Images in Ruby on rails 4 App »
I am using this code to display random images for similar products in the same category the selected product is in. <div class="row container pro...
(1) odpowiedzi
2017-09-29 16:09 Creating a full path to sub-directory on a server »
I am currently working on a Rails application and recently received a request to add the ability to go to a sub-directory on the server at work. i.e....
(1) odpowiedzi
2017-09-29 15:09 What do you recommend to use intead of rack-timeout gem »
I'm looking for an alternative to rack-timeout gem. I found some (for ex. https://github.com/ankane/slowpoke), but would like to know if you have any ...
(0) odpowiedzi
2017-09-29 14:09 Rails where query chain with or for array input »
I want to create a query chain in order to find my bot users given specific filters. Some filters can have multiple values. For example, my "locale" f...
(2) odpowiedzi
2017-09-29 07:09 How to convert strong parameter rails 4 »
My form sends data like {"utf8"=>"✓", "authenticity_token"=>"", "org_document"=>{"is_fin_changed"=>"Y"}, "commit"=>"Save", "docu...
(1) odpowiedzi
2017-09-29 06:09 Rails + RSpec + Set the Order of Test Cases Files while running RSpec Test Suite »
For RSpec Capybara Test Case [ Selenium ], I have near about 7 to 8 spec files. Few of the test cases are dependent on each other. For example, before...
(3) odpowiedzi
2017-09-29 02:09 Run rake assets:precompile before tests that include :js tag and skip otherwise »
tl;dr -- Is it possible to run a single command (e.g. rake assets:precompile ) only when there is a :js test included in the body of tests being run?...
(1) odpowiedzi
2017-09-28 23:09 Send email to only certain Users, Rails 5 »
I'm having trouble sending an email blast to only certain users who have a boolean set to true and to not send the email to those users who have it se...
(1) odpowiedzi
2017-09-28 22:09 Neo4j.rb: how to search from serialize property having array »
class Picture property :name property :user_ids serialize :user_ids end Picture.create(name: '1', user_ids: [1,4,5]) How to find all pictur...
(1) odpowiedzi
2017-09-28 21:09 Recursively looping through all the tables in Rails »
I normally create a model called Maintenance to do miscellaneous things: In this case I have a method called show_all_tables_count. What this is supp...
(2) odpowiedzi
2017-09-28 19:09 Rails 4 app is not writing to production.log , running on Nginx, ubuntu and deployed via capistrano »
My app is breaking when customer place an order. I'm really getting desperate since I need my production.log to figure out what is breaking the app!...
(1) odpowiedzi
2017-09-28 17:09 TypeError: superclass mismatch for class Task »
I have a Rails project and use RSpec for testing. Recently, I added this in my spec_helper.rb: config.before(:suite) do Rails.application.load_task...
(1) odpowiedzi
2017-09-28 17:09 Rails' ActiveRecord doesn't see tables in SQLite3 database after migration »
I did rake db:drop rake db:create and rake db:migrate. When I run sqlite console, I get the following: sqlite> .tables ar_internal_metadata grou...
(0) odpowiedzi
2017-09-28 16:09 How do I create a task in Rails to run one time in the future? »
I have a subscription-based site that allows unregistered users to download files if they give me their email. I want the following workflow. User g...
(2) odpowiedzi
2017-09-28 15:09 Rspec - uninitialized constant error User »
I have written tests on Rspec for my model User and get error while starting 'rspec spec' NameError: uninitialized constant User my test spec/models...
(0) odpowiedzi
2017-09-28 15:09 errors replacing development.sqlite3 with another development.sqlite3 on rails »
I am trying out an example from a book head first rails, i get to chapter 2 and i have issues following the instructions maybe because they used an ol...
(0) odpowiedzi
2017-09-28 15:09 Rail Query includes + filter by colunm »
I start in Ruby and Ruby on rails. I am trying to modify the access to this object (below) in base via the orm and I will like to filter by the values...
(1) odpowiedzi
2017-09-28 14:09 option selected once in select field. Link adds a new select which should show the remaining options »
I have a nested form which has a link_to_add which calls a partial having select field .Which have to be changed, option selected once in select field...
(0) odpowiedzi
2017-09-28 12:09 Filter specific parameter »
I know that I can filter parameter with config.filter_parameters << :password but if I need to filter specific parameter from specific model...
(1) odpowiedzi
2017-09-28 05:09 has_one association creates multiple records in rails »
I have a User model and Shop model. I want to allow user to create only one shop. So in my User model class User < ApplicationRecord # Include d...
(1) odpowiedzi
2017-09-27 23:09 Concerns vs Services »
Recently I was building a complex logic controller and wanted to refactor it due to “Single responsibility” principle. So I read about Services. B...
(2) odpowiedzi