Data dodania Pytanie
2017-05-25 13:05 RoR - Show model linked with a foreign key »
In my app I have Users and Bands. A User can create a Band, so in the database schema, the table Band has a foreign key band_manager_id referred to th...
(1) odpowiedzi
2017-05-25 12:05 google admin directory insert user »
I am trying to insert user account through https://www.googleapis.com/auth/admin.directory.user. I am using the following gem 'google-api-client', '0....
(1) odpowiedzi
2017-05-24 23:05 Trick to delete session after going back in browser »
I have an issue. I have a list of recipes in my recipes index page. The idea is that when you click on a particular recipe, it carries you to the show...
(1) odpowiedzi
2017-05-24 23:05 Odd JSON structure from backend dev »
I'm an iOS developer, and I got this JSON response from my backend: "image_url": { "url": "https://..." } I found it strange that the url string ...
(0) odpowiedzi
2017-05-24 21:05 Combine hash and array data »
I have an array and hash which I need to combine. Please let me know the simplest way to do this. array1 = [:user_id, :project_id, :task_id] entry_h...
(1) odpowiedzi
2017-05-23 22:05 200 status response to Slack interactive message not working »
I am integrating my app with Slack, in particular interactive messages. I have enabled interactive messages and am using ngrok to route the action URL...
(0) odpowiedzi
2017-05-23 21:05 Rails 4 & Devise 4: Keep user on current page after updating profile »
I have a User model, and I am hoping to have different pages to edit their info so that I don't have everything on edit.html.erb So far I have create...
(1) odpowiedzi
2017-05-23 07:05 rails partial passing variable does not work »
I have this: view: confirmations.each do |c| <%= render "form", confirmation: c %> end partial: <%= simple_form_for @confirmation do |f...
(1) odpowiedzi
2017-05-22 22:05 Issue with param not pushing data to database in Rails »
Quick one. I'm trying to push a parameter into the database when i'm creating an object. I have it working if I force the integer as with the commente...
(3) odpowiedzi
2017-05-22 19:05 How to schedule a rake tasks in Google Cloud? »
I had a Rails application on Heroku, and to schedule some rake tasks I used an add-on called Scheduler. I had to change my application to Google Cloud...
(1) odpowiedzi
2017-05-22 17:05 Ruby: interpolated string to variable name »
In Ruby, how can I interpolate a string to make a variable name? I want to be able to set a variable like so: "post_#{id}" = true This returns a s...
(2) odpowiedzi
2017-05-21 17:05 Rails logger middleware error »
In a controller, in I have defined a method which looks something like this: def blah begin # do something # works fine till here, no issue...
(1) odpowiedzi
2017-05-21 05:05 sign_in user if devise not working for rspec »
Following this I came up with this code: config.include FactoryGirl::Syntax::Methods config.include Devise::Test::ControllerHelpers, type: :controll...
(0) odpowiedzi
2017-05-21 01:05 how to efficently use group_by using rails »
I have tables records like below: I am grouping them based on by am, pm and none. What I really need to break down the group_by for none to 7 7 co...
(1) odpowiedzi
2017-05-20 18:05 Rails Devise Registrations sign_up not rendering with custom layout »
My sign_up page stopped rendering using my custom layout, other device views work properly and I can't figure out what is wrong. Here are the pertine...
(0) odpowiedzi
2017-05-20 11:05 Rendering a view »
I have partials calling from a bootstrap sidebar. Each tab points using bootstrap js to a partial. When I do an action and the page refreshes it bring...
(1) odpowiedzi
2017-05-20 08:05 Error running Rails Server - unable to load gem 'sass-rails' »
I'm new to Rails and trying to load and configure it for the first time. I'm following the instructions on http://installrails.com/steps/rails_for_li...
(2) odpowiedzi
2017-05-19 23:05 Why don't any of my rspec or cucumber tests run locally? »
I have inherited a rails app which has an extensive suite of rspec and cucumber tests, when I run these tests on a CI server such as Circle, I see the...
(0) odpowiedzi
2017-05-19 15:05 Sunspot solr "No field configured for User with name 'C2'" »
I want to add ordering on my sunspot search. Without ordering search works perfectly. Here is my search method: def search @search = User.search ...
(1) odpowiedzi
2017-05-19 09:05 Submit button with Options »
For one form, I want to have two submit buttons , named: Appove, Decline when the user clicks on Approve it should send approve: true as well when ...
(2) odpowiedzi
2017-05-19 00:05 how to submit ajax data to .js.erb rails »
I want to get the data sent from ajax request in my method_name.js.erb. It sends the request successfully but the problem is that I can't able to ge...
(2) odpowiedzi
2017-05-18 17:05 Could not log "render_template.action_view" event after rails upgrade to 4.2.8 »
I am in the process of upgrading a rails app that mostly serves JSON. The last working version I was able to upgrade to is 4.1. Once I upgraded to 4.2...
(1) odpowiedzi
2017-05-18 13:05 How does routes of Ruby On Rails know which controller to hit when we hit an url »
How ROR routes recognise which controller method to hit while we hit an url. ...
(2) odpowiedzi
2017-05-18 11:05 How to use OR in ActiveRecord Rails 4.1.1? »
I'm used scope where(address: [nil, ''], city: [nil, '']) and I get request WHERE ((`address`.`address` = '' OR `address`.`address` IS NULL) AND (`a...
(2) odpowiedzi
2017-05-18 11:05 Does normal indexing also work by creating unique index? »
Hi Guys, i would like to know, if i create unique index of two columns on postgreSQL, does normal indexing for the both columns also work by same uniq...
(1) odpowiedzi
2017-05-18 02:05 Rails Integration tests don't start fresh »
I'm having difficulty running multiple integration tests on Rails 4 (now called system tests in Rails 5). Environment: Rails 4 / Minitest / Capybara ...
(1) odpowiedzi
2017-05-17 22:05 Find Models with PaperTrail included on Rails app »
I'm implementing a form in Rails to search previous versions of a record - versioning implemented with PaperTrail gem. The form will contain a dropdo...
(1) odpowiedzi
2017-05-17 21:05 Produce a NestedHstore hash with Rails fixtures »
I have a field called custom that is defined as a NestedHstore: # project.rb serialize :custom, ActiveRecord::Coders::NestedHstore I create fixture...
(0) odpowiedzi
2017-05-17 11:05 access instance variable defined in ClassMethod »
I have a controller where I'd like to define a specific list of permissions, like this: class Backoffice::OrdersController < ApiController inclu...
(1) odpowiedzi
2017-05-16 14:05 Dockerfile - how to run script? »
Created a docker file, but unable to get run the rail setup script i.e ./bin/setup to execute What am I doing wrong? RUN /bin/bash -C "/usr/src/app/b...
(1) odpowiedzi
2017-05-16 13:05 Gems are not being installed from capistrano deployment »
I am using: rails 4.2 unicorn server nginx web server capistrano for deployment. If I am adding a new gem to gemfile it's not reflecting in the a...
(1) odpowiedzi
2017-05-16 05:05 Rails why undefined local variable or method `new_dispute' for #<#<Class:0x007fec13d18678> »
i added dispute new link inside orders but rails log shows since the dispute is associated with order in the model why still show undefined local var...
(1) odpowiedzi
2017-05-15 14:05 Rails' structure.sql - what's best practice to solve painful merge conflicts? »
We suffer from an ongoing pain point in our Rails 4.x project. We use structure.sql in the standard way as the base for our tests database. In develo...
(1) odpowiedzi
2017-05-15 12:05 Use boolean attribute helper methods when extending from Virtus.model on the fly »
Let's say I have a Virtus model User with a boolean attribute active: class User include Virtus.model attribute :active, Boolean, default: false...
(1) odpowiedzi
2017-05-15 01:05 Ruby on Rails - Problems with DELETE and EDIT of an object »
Currently i am struggling with creating my first rails web app. It should be a blog (following the tutorial). I can create new articles, see them but ...
(1) odpowiedzi