Data dodania Pytanie
2017-06-16 23:06 Tried to upload a project to Heroku, Heroku said my binstubs are mangled »
I am unable to upload a project to Heroku, after speaking to their support they have told me the following: Your binstubs are still messed up ...
(1) odpowiedzi
2017-06-16 23:06 How to get JSON objects value in dataTables columns initialization, if its name contains dots? »
I'm using Data Table server side, but i can't get the JSON object. The table is initialized in this way: var table = $('#index-table-company_tutors')...
(1) odpowiedzi
2017-06-16 22:06 Commit a nested transaction »
Let's say I have a method that provides access to an API client in the scope of a user and the API client will automatically update the users OAuth to...
(1) odpowiedzi
2017-06-16 22:06 Rails RSpec, DRY specs: shared example vs. helper method vs. custom matcher »
I have the following test repeated once for each HTTP method/controller action combination within a controller spec: it "requires authentication" do ...
(2) odpowiedzi
2017-06-16 21:06 How can I make follow form work with a list »
I have a relationship model that follow users back n forth now it works very well when I use it in users#show in my view just like this screenshot ...
(0) odpowiedzi
2017-06-16 17:06 Rails 4 Whitelist IP's to Single Route »
I have a form within my public page that I would like to lock down to internal IP ranges. I have been looking around at the answers to other questions...
(2) odpowiedzi
2017-06-16 15:06 Enter key to send works only once in java script »
I have a code that submits the form, whenever we press enter key on text area... it works, but code runs only 1 time. whenever I press enter again to ...
(1) odpowiedzi
2017-06-16 14:06 Rails 3 #update_attributes »
I'm working on a Rails 4 app that was previously upgraded from Rails 3. I haven't worked much Rails 3 before. I came across this something like this u...
(2) odpowiedzi
2017-06-16 12:06 Postgres select duplicate on one column but different on another »
I have a database with two columns: author_id, message And entries like: 123, "message!" 123, "message!" 123, "different message" 124, "message!" ...
(3) odpowiedzi
2017-06-16 05:06 check if url can be loaded in an iframe »
Snip.ly nicely checks if the entered web address can be used in an iframe. I'd like to replicate it in ruby. Looking through their code they send an a...
(0) odpowiedzi
2017-06-15 17:06 RSpec feature specs can't find routes for Rails Engine »
I'm developing a Rails Engine using rails v5.1.0 and rspec-rails 3.5.2. I have a simple feature spec: require "rails_helper" module MyEngineName ...
(1) odpowiedzi
2017-06-15 13:06 Ruby on Rails - Security Notifications »
I'm working on a project with ROR framework and the gem "Devise" for the authentication. Actually i have 3 model of users : User Admin Company I ...
(0) odpowiedzi
2017-06-15 09:06 Put gem class into namespace »
To my Rails Gemfile I added a new gem. It is used like this: Email::Client The issue I'm having right now is that I also have a class in my rails a...
(1) odpowiedzi
2017-06-15 09:06 Update with original value »
I have a Bank model with attributes id, name, code and rate. I just changed the rate method of bank model. But the problem is when I am updating the b...
(0) odpowiedzi
2017-06-15 07:06 Create a template and replace placeholders dynamically in Ruby On Rails »
I have a set template in which there is address informations and other set of user information. I have created a html file in the public folder and l...
(2) odpowiedzi
2017-06-15 05:06 Ruby on Rails: Why does calling a partial in my views take an extended time to render? »
For example, I'm calling three partials in my recipes/_cuisines.html.erb file: <%= render "recipes/cuisines/denmark.html %> <%= render "...
(1) odpowiedzi
2017-06-15 05:06 Giving conditions in model for values in database »
I want to give conditions to my fields in model so that when i define a value from my controller new action it automatically changes the value of anot...
(1) odpowiedzi
2017-06-15 04:06 rails cannot create a new item »
I am working on creating a small rails app, and I have ran into a problem that I believe is in the backend of my database, but I don't know how to sol...
(3) odpowiedzi
2017-06-15 02:06 How to merge two array objects in ruby? »
If I start with two arrays such as: array1 = [{"ID":"1","name":"Dog"}] array2 = [{"ID":"2","name":"Cat"}] How to merge this array into one array li...
(4) odpowiedzi
2017-06-14 23:06 Rails ActiveRecord access record through has_many association using a different key »
Scenario I'm building an admin panel in Rails for an old app that i wrote a while ago therefore the database is not designed to work with ActiveRecor...
(3) odpowiedzi
2017-06-14 21:06 Scrape an entire API or rely heavily on it? »
I'm building a resort review site in rails. Currently, a User has many reviews, and each Review belongs to a User. The reviews table contains an exp...
(1) odpowiedzi
2017-06-14 19:06 Right way to handle old versions of mobile app when your database schema has changed »
i have an ionic android mobile app which connects to a ruby on rails api server and this app uses postgresql as database server. whenever i create a ...
(1) odpowiedzi
2017-06-14 19:06 Rails - Show number of users currently visiting a page »
I got a page in my App where users can chat. Now I want to display the number of Users that are currently viewing the chatpage. Is there a way to do t...
(1) odpowiedzi
2017-06-14 17:06 How to cache a ActiveRecord model object which contains carrierwave uploader to Redis »
I have a user model which has a carrierwave uploader for storing ths users profile picture class User < ActiveRecord::Base mount_uploader :pro...
(1) odpowiedzi
2017-06-14 11:06 Ruby on rails, Validation failed: Countries can't be blank »
it "renders index page" do projects_user = FactoryGirl.create(:projects_user) get :index, id: projects_user.id expect(response).to render_templa...
(1) odpowiedzi
2017-06-14 09:06 rspec - uninitialized constant Rails (NameError) - a new case »
Off course I read this: rspec testing throws Uninitialized constant Rails (NameError) But I am sure that there is nothing wrong with my code. Just ...
(0) odpowiedzi
2017-06-13 23:06 Notification feed issue with data structure of @activities, not sure how to loop through it »
I'm trying to render my notification feed activities but I can't seem to figure out how to properly loop through @activities. For background, I follo...
(1) odpowiedzi
2017-06-13 23:06 Using ActiveJob, perform_now seems to have different results than perform_later »
I'm using ActiveJob with SideKiq and with the code below I'm getting differing results when using perform_later than perform_now. When using perform_...
(0) odpowiedzi
2017-06-13 22:06 Rails ActiveRecord_Associations_CollectionProxy with Single Table Inheritance »
I used Single Table Inheritance to model out Stores, Tailors, Orders, and TailorOrders. Orders belong to a tailor, but I am not able to access the ord...
(2) odpowiedzi
2017-06-13 22:06 Password confirmation in Rails 5 »
This is my view: <%=form_for [:admin, @user] do |f|%> <ul> <% @user.errors.full_messages.each do |msg| %> ...
(2) odpowiedzi
2017-06-13 21:06 Polymorphic has many though with STI in rails »
I've faced unusual situation with rails association and created simple sample to show that. Assume we have 4 models: 1) list.rb class List < App...
(1) odpowiedzi
2017-06-13 18:06 RSpec test for update within another action »
I am building an application in Rails 5 that sends user inputs back to a controller called "TestsController." If the params[:answer] matches the "corr...
(2) odpowiedzi
2017-06-13 14:06 How can I create ActiveRecord for the following sql »
How can I create an ActiveRecord Query for the following Sql query SELECT device1.* FROM devices device1 WHERE device1.id = (SELECT MAX(device2.id) ...
(1) odpowiedzi
2017-06-13 10:06 Editing existing record creates duplicate Rails 5 »
I had just been having problems with creating new records as posted here Can't create new record via form in Rails 5 app, so not sure if this coul...
(3) odpowiedzi
2017-06-13 00:06 `form_for` is bypassing model accessors. How to make it stop? »
I set these methods to automatically encrypt values. class User < ApplicationRecord def name=(val) super val.encrypt end def name (...
(3) odpowiedzi