Data dodania Pytanie
2017-04-13 23:04 jquery_datepicker not working with Rails 4 »
See the following repo for example project: https://github.com/aarona/date_picker At first I thought the problem was caused by the model being tablel...
(1) odpowiedzi
2017-04-13 22:04 Logging Query Type in Rails »
I want to log the query type(DDL,DML,etc.) in the log, while logging the query trace in Rails. I achieved the query trace logging by patching ActiveSu...
(1) odpowiedzi
2017-04-13 21:04 "TypeError: no implicit conversion of Symbol into Integer" In one controller test »
EDIT: I've rewritten the question to reflect some of the suggestions and changes made to the code while trying to solve this problem. I'm trying to w...
(0) odpowiedzi
2017-04-13 15:04 Rails 4: Maintain form inputs after validation »
I have a form on my Locations#show view for a different model (PotentialClient). When my form fails validations, the redirect empties all fields beca...
(1) odpowiedzi
2017-04-12 18:04 Rails 4 + Devise Invitable: Reset Password »
I have a user index and I want to add a button that would send a password reset email when I click it (for when users lose their invitation). # View ...
(1) odpowiedzi
2017-04-12 14:04 Ajax calls with Rails 5 using remote_function »
I am trying to upgrading a 2.3.2 rails application to rails 5. I know that no more remote_function in rails 3, 4, 5. How can I fix the bug using Ajax ...
(0) odpowiedzi
2017-04-12 04:04 Rails enum symbol vs string »
I have just started working on a new rails project, and I have noticed that the previous developer has used strings instead of symbols as keys for the...
(1) odpowiedzi
2017-04-12 04:04 Is there a better way to calculate the total value of this invoice model? »
I have an Invoice model that has a has_one relationship to another Cart model, Cart has_many line_items and each line_item has a product with a price...
(1) odpowiedzi
2017-04-11 17:04 Dygraphs not rendering after Rails 4 upgrade »
Recently upgraded an old Rails 3 app to the last version of Rails 4. No changes made on dygraphs gem config, nor files, etc. But graphs are not displa...
(0) odpowiedzi
2017-04-11 03:04 psql db dump on digital ocean server to local machine »
I have an app running on Ubuntu on digital ocean, and I want to do a db dump to my local machine. It's a rails app. I've tried running the following...
(2) odpowiedzi
2017-04-11 02:04 Only use value in method when value is available in Rails 5 »
I am using the aslsx gem in Rails to generate Excel files. In my template I have: wb = xlsx_package.workbook wb.add_worksheet(name: "Buttons") do |s...
(3) odpowiedzi
2017-04-10 20:04 how to rescue specific exceptions in rails »
I am executing a sql function and capturing standard error. is it the right way? if not how can i catch specific exception? query = ActionControl...
(1) odpowiedzi
2017-04-10 20:04 Find comments with no reply either by vote or comment by current_user »
Overview I have a list of comments where the current_user can either reply with a new comment or vote for the comment. Now i'm trying to create a vie...
(1) odpowiedzi
2017-04-10 16:04 How to include erb file on another? »
I have template file .erb with HTML code inside. How to include it in another file erb? I tried to use section but this is not that I need ...
(1) odpowiedzi
2017-04-09 21:04 Understanding after_update callback in Rails 4 »
I have a Rails object with after_update callback that sends a record to a queue. And the problem is that I noticed sometimes the queue is being proces...
(2) odpowiedzi
2017-04-09 14:04 Couldn't find Product with ID=2 for Product with ID=1 self referential has and belongs to many in Rails 4.2.6? »
Trying out a simple example with a self-referential has and belongs to many and I'm getting "Couldn't find Product with ID=2 for Product with ID=1" d...
(0) odpowiedzi
2017-04-09 03:04 Error: No template found for XxxController#update, rendering head :no_content »
Hello i have the follow code working in development. class SetupController < ApplicationController def update if current_user.update_attribu...
(2) odpowiedzi
2017-04-08 20:04 Trying to find all tasks that belong to a project »
I'm looking to find a way to pull all tasks that belong to a project where the project has a specific team attribute. Project has_many tasks Tasks ...
(2) odpowiedzi
2017-04-08 20:04 Rails - User Populate/Change ZIP code location using JQUERY »
I'm developing an ecommerce application which requires user to enter his/her zip code location to show the listing closer to his/her area. I have a po...
(0) odpowiedzi
2017-04-08 06:04 no implicit conversion of Symbol into Integer Error with hash »
I get the error "no implicit conversion of Symbol into Integer" Here is my code: # == Schema Information # # Table name: my_payments # # id ...
(1) odpowiedzi
2017-04-07 19:04 Dynamic Routing in Rails for landing page »
I currently have this in my routes.rb get 'admin', to: 'admin/appointments#index' I want the route to be dynamic based on the user that logs in. Bu...
(1) odpowiedzi
2017-04-07 16:04 undefined method `total_pages' for #<Tuto::ActiveRecord_Relation:0x007fc3b2473d80> »
I found couple of similar cases but nothing to fix my problem... I am using the gem Kaminari to paginate my app. Since I added it, researches are fa...
(1) odpowiedzi
2017-04-07 00:04 pg gem upgraded 0.19 to 0.20 - LoadError: incompatible library version »
I'm using Capistrano 3 to manage my deployments to AWS, developing on OS X and serving on Ubuntu. I continue to run into the following issue whenever...
(1) odpowiedzi
2017-04-06 23:04 Ruby sort array with objects by first character of string »
this is my first try using ruby, this is probably a simple problem, I have been stuck for an hour now, I have a ruby array with some objects in it, an...
(2) odpowiedzi
2017-04-06 16:04 Why do i get 'no implicit conversion of ActionController::Parameters into String' when I pass a parameter to session.upload_from_file »
I am developing a tool which uploads a file to Google Drive. I am using 'google-drive' gem. In my view I have taken it as <%= file_field :file, ...
(2) odpowiedzi
2017-04-06 15:04 accessing child namespaced controllers from a parent controller »
recently i came across problem problem in accessing the namespaced controllers i have a parent controller in education/educations_controller.rb as c...
(0) odpowiedzi
2017-04-06 15:04 How is the server getting Object Object params? »
We have a situation where somehow users are submitting a form and the server is getting this as params. HTTP Method: POST * Parameters : {"object Ob...
(0) odpowiedzi
2017-04-06 06:04 Customise as_json response in ruby »
I am building rest APIs in ruby I am using @object.as_json() for the response in json format I am getting stuck in the mid while transfer the data i...
(1) odpowiedzi
2017-04-05 21:04 Rails: Skip after_create »
I have 2 models: class User < ActiveRecord::Base has_one :client end class Client < ActiveRecord::Base belongs_to :user end and I no...
(1) odpowiedzi
2017-04-05 20:04 How to change method name for has_through rails association? »
I am trying to create two has many relations to the same destination tables but I am unable to override the default method name rails creates when def...
(2) odpowiedzi
2017-04-05 20:04 Rails: Log rake task »
I am trying to log the output of a rake task to a new logger. Ideally the solution would work in development and production. Here is my task: task ...
(1) odpowiedzi
2017-04-05 12:04 How to Restore Mysql database to MS Sql Server in Rails 4 on Windows »
I created dump file of database in Mysql.Now i want to restore all the data of mysql to Sql Server.In case for mysql its simple by running source dump...
(0) odpowiedzi
2017-04-04 15:04 Already initialized constant Patientinfo::PATIENT_HASH. warning: previous definition of PATIENT_HASH was here »
I created a concern patientinfo with following code module Patientinfo extend ActiveSupport::Concern included do PATIENT_HASH = { '0' ...
(1) odpowiedzi
2017-04-04 14:04 NoMethodError: private method `permit' called for #<Devise::ParameterSanitizer »
I had my application up and running on heroku but suddenly it stopped working and when i checked the logs it says NoMethodError: private method `p...
(1) odpowiedzi
2017-04-04 09:04 LMS-LTI Test Cases in Rails »
I am writing Test Cases using Rspe for LTI Consumer and setting its oauth nonce, oauth signature and then calling my controller to bypass this data as...
(0) odpowiedzi