Data dodania Pytanie
2017-03-02 13:03 How to add uniqueness on many to many using through on column of other table »
I have two models Company, Asset and a join model CompanyAsset and the association is as follows: class Company < ActiveRecord::Base has_many :c...
(2) odpowiedzi
2017-03-02 11:03 How to change any by all in active admin collection data? »
I am using collection for filter data. filter :"status" , :as => :select, :collection => User::STATUS I want to change default option label any ...
(1) odpowiedzi
2017-03-02 02:03 Struggling to add has_many through relationship »
I am trying to make a has_many through relationship like this: #user.rb class User < ApplicationRecord # Include default devise modules. Others ...
(3) odpowiedzi
2017-03-01 21:03 Rounding in Ruby (Rails) »
I don't know why this is so difficult, I am clearly using the wrong methods. But I am working with the Stripe API (everything works well) and I am try...
(2) odpowiedzi
2017-03-01 21:03 Rails form_for checkbox validation without record in database »
I'm trying to create an User register form that has to accept a set of terms and condition, but I don't know how to use the value of the checkbox to v...
(2) odpowiedzi
2017-03-01 08:03 nested routes is working different in rails 3.2 and rail 4 »
I am using rails 3.2 and having the following routes resources :projects do resources :assessments end Now when I am using project_assessm...
(0) odpowiedzi
2017-02-28 20:02 Remove users from database (Ruby on Rails, Devise) »
I'm trying to create a button to remove users from the database. In the routes I have: devise_for :users, :controllers => { registrations: 'reg...
(1) odpowiedzi
2017-02-28 09:02 Using Partial View's Controller Instead »
I'm trying to use partial view's controller instead of the view where I render it. My scenario is as following; I have users and users can post somet...
(2) odpowiedzi
2017-02-28 04:02 How to deploy rails application running locally(on my laptop) to live server (of my university) for local access »
I am building an application for the students of my university. I am using ruby on rails for this and that application is running on my laptop at http...
(1) odpowiedzi
2017-02-27 23:02 Problems with Stripe Gem »
I'm getting this error message whenever I tried to start Rails server after installing Stripe gem. $ rails s /home/alex/.rvm/gems/ruby-1.9.3-p551@r...
(0) odpowiedzi
2017-02-27 17:02 OpenSSL::SSL::SSLError - read finished A: decryption failed or bad record mac »
I am using RestClient to access an external API using a certificate available. I have useed it like this, require 'rest-client' p12 = OpenSSL::PKCS...
(0) odpowiedzi
2017-02-27 14:02 Job failed with status 1 (command: app_dir/script/runner -e production namespace.task_name »
Job failed with status 1 (command: app_dir/script/runner -e production namespace.task_name The above error I am getting in my syslog, my cronjob thi...
(0) odpowiedzi
2017-02-26 18:02 Ruby On Rails - how to compromise the modularity of the code? »
I was in an interview for an internship last week and I was given a part of ruby on rails code of a controller. Then the interviewer asked me to "comp...
(0) odpowiedzi
2017-02-26 18:02 Creating form that changes multiple models »
So I have an assignment where I have to build an app with Ruby on Rials and i'm having some trouble with using forms.. The app basically is a video si...
(1) odpowiedzi
2017-02-26 04:02 How to add a single custom route in rails? »
I have a 'transaction' model, controller and view, which I created with rails generate. Now I need to add a single custom route of /transactions/histo...
(2) odpowiedzi
2017-02-25 12:02 How to assign role to user in Registration Controller and its view with Rolify and Devise »
I want to have radiobuttongroup to choose role in my view but im not sure how to handle it. I've already setup the gems rolify and devise but Im not s...
(0) odpowiedzi
2017-02-24 21:02 (Errno::EACCES) Permission denied with pygments.rb »
I have been really struggling with installing pygments.rb and did not find solution whatsoever. This is the error code: PS C:\Users\PC\Desktop> ...
(1) odpowiedzi
2017-02-24 06:02 How to convert png image into autocad format in ruby on rails? »
I am converting png image into autocad format(.dxf).But after conversion png to dxf .Image is not opening in autocad software. Code for convert PNG i...
(1) odpowiedzi
2017-02-24 06:02 Getting asset not loading issue after deployment via Capistrano Linux AMI »
We are facing the issue on the staging server. The steps are as below which we have followed to deploy the application on the staging server. Actuall...
(0) odpowiedzi
2017-02-23 21:02 Connect Multiple Yields in Rails »
Rails Newbie. Be gentle. If I need to show more stuff I'll do it. Trying to insert a newsletter signup block above my footer on a project but didn't ...
(2) odpowiedzi
2017-02-23 21:02 How to write into different tables when rails model has been inherited? »
I have the following models: class Building < ActiveRecord::Base;end class Department < Building;end class Organization < Building;end W...
(1) odpowiedzi
2017-02-23 09:02 How to take screenshot of googlemap from web page using PhantomJs? »
My Requirement is to take screen shot of Google Map of web page.I am drawing Markers and Polyline dynamically on Google Map.I am using PhantomJS for ...
(1) odpowiedzi
2017-02-23 03:02 How to write the active record query »
I have three models in context of this question: class ClearanceBatch < ActiveRecord::Base has_many :items belongs_to :user end class...
(1) odpowiedzi
2017-02-22 18:02 Rails 4 Tests running in "development" environment by default »
We are porting a Rails 3 project to Rails 4. Our tests run fine under Rails 3, environment is correctly defaulted to test. However, when I switch ov...
(0) odpowiedzi
2017-02-22 17:02 Devise inline errors stop showing up when overriding update method »
Using Rails 3.2, Devise 3.5.1, SimpleForm I'm using a custom update method in Devise: def update resource = resource_class.to_adapter.get!(send...
(1) odpowiedzi
2017-02-22 12:02 How can I use fields_for to update a has_many association »
I am making a quiz, and I have a Survey Model, Question Model and a Choice model I am looping over all of the questions and showing the choices for th...
(0) odpowiedzi
2017-02-21 22:02 map concern hash keys with the table column »
I created a concern in model module Employee extend ActiveSupport::Concern included do def job job_hash = { '0': 'A', ...
(1) odpowiedzi
2017-02-21 14:02 Ruby on Rails: Search collection_check_boxes on a form »
In my RoR application I have functionality that allows a user to select contacts to send an email to. I want to add to this functionality so that a us...
(1) odpowiedzi
2017-02-21 13:02 Delete server header from response »
Env :- Rails 3.2 , Ruby-2.1.1p76 Server: nginx/1.8.0 + Phusion Passenger 4.0.59 X-Powered-By: Phusion Passenger 4.0.59 I want to remove these 2 hea...
(2) odpowiedzi
2017-02-20 22:02 Ruby on Rails validation does not show error messages »
My problem is a little related to this question, and the corresponding solution has proved useful and helpful, however there is a little digression fr...
(0) odpowiedzi
2017-02-20 15:02 Permit multidimensional params »
I receive this params: <ActionController::Parameters {"page_hierarchy"=> [<ActionController::Parameters {"id"=>"6", "...
(1) odpowiedzi
2017-02-20 02:02 Get specific information from multi-dimensional array »
Let say I have a array in this format: arr = [{ "id":"11", "children":[ { "id":"9"}, { ...
(3) odpowiedzi
2017-02-19 17:02 avoid data type check in rails form »
I have typeahead autosuggest field in my rails form for taking the name of person but in the model i have id for the person but the problem is when i ...
(1) odpowiedzi
2017-02-17 10:02 Format a string containing Phone numbers »
I have a string containing phone numbers separated by ,, phone = "08763843478,+918763843478,08763843478,+918763843478,+918763843478" I want to form...
(2) odpowiedzi
2017-02-16 11:02 Why my user_id is updated to null? »
I have 2 model one for user(amitians) other is about.rb to store their details they have a has_one relationship between them but problem is whenever I...
(1) odpowiedzi