Data dodania Pytanie
2017-04-03 11:04 Ruby on rails rake db error »
I have cloned a project and ran it locally on my machine. I'm getting an error when i run rake db:migrate. Can anyone please explain this to me? I h...
(2) odpowiedzi
2017-04-03 11:04 Query, SQL, Ruby on Rails »
I am working a project and encountered a problem regarding writing the best query for the problem. I will start presenting the problem and the soluti...
(0) odpowiedzi
2017-04-02 23:04 Rspec error: ActionController::UrlGenerationError: No route matches »
I have been surfing google and this site a ton but cannot get a solution for this error that works. If anyone could help it would be greatly apprecia...
(1) odpowiedzi
2017-04-02 20:04 Trying to find total for completed and uncompleted projects »
I'm looking for a way to count the total number of completed tasks for any projects within the same "team". Preferably, I'd like to show them as "Day ...
(0) odpowiedzi
2017-04-02 17:04 Refactoring the following code? »
I have two models blog and comment. Blog contains multiple comments, comment can only belong to 1 blog. For showing the API like blog/2/comment/1 I...
(1) odpowiedzi
2017-04-01 21:04 Update parameter on controller »
I am creating 2 modules, 1) price list, 2) discount list. These two modules share a table in the database called "relclili" in it will store the custo...
(1) odpowiedzi
2017-04-01 20:04 Cancan - using accessible_by on an instance variable »
I'm doing some cancan unit testing in ability_test.rb. I have @permitted_things and @excluded_things, defined as things that the current user should ...
(0) odpowiedzi
2017-04-01 14:04 Override AuthorizationsController Doorkeeper »
I'm overriding Doorkeepers AuthorizationsController. As the docs suggested I inherit from the AuthorizationsController. Now the code below shows my la...
(1) odpowiedzi
2017-03-31 22:03 Rails4: collection_check_boxes from array »
There is some way to serialize a collection_check_boxes from one constant? Something like this: # model class tutorial < ActiveRecord::Base seri...
(1) odpowiedzi
2017-03-31 13:03 How to set date field in join query ruby on rails »
I have below query in which I want to check the date. The actual working query is like: Quiz.joins(lesson_plan: [private_class: [private_school: :j...
(2) odpowiedzi
2017-03-31 08:03 How to remove a specific route from a mounted engine in rails 4 »
In my routes.rb file I have mounted engine routes. mount SomeEngine::Engine => '/', as: 'some_engine' It adds this route: match '*path' => '...
(1) odpowiedzi
2017-03-30 14:03 What is the highest Ruby version supported by Rails v4.1.16? »
In other words, can I run Rails 4.1.16 on Ruby 2.4? If not, can I run it on Ruby 2.3? ...
(3) odpowiedzi
2017-03-30 09:03 Database configuration file for Sql server on windows »
What is the configuration of database.yml file for sql server in windows. ...
(1) odpowiedzi
2017-03-30 02:03 Rails select_tag with i18n translation »
I have the following select_tag and would like to have the labels translated. I am using Rails Internationalization (I18n) API Now, this code works h...
(2) odpowiedzi
2017-03-29 10:03 Replace Mysql database from one Computer to Other in Rails as we do in sqlite3 »
I switched to mysql dtabase in Rails.I got a databse.sql file generated in db folder.But when i login to mysql and check data in tables then there is ...
(1) odpowiedzi
2017-03-29 08:03 Sass Undefined variable: "$navbar-height" in RoR »
I am trying to precompile the assets, but I get the below error. The problem is with one of the css files being used from gems. How to resolve that? ...
(1) odpowiedzi
2017-03-29 03:03 Error including jquery-ui/autocomplete »
I'm currently trying to get auto-complete to work with my rails app, however when I try to load a page I get the error below. couldn't find file 'jqu...
(0) odpowiedzi
2017-03-28 21:03 Paper trail controller as meta data does not work. (Ruby 2.3.3, Rails 4.2 and paper_trail 5.2.3) »
Following the steps to capture information from the controller as meta data does not work. (Ruby 2.3.3, Rails 4.2 and paper_trail 5.2.3) model has_p...
(1) odpowiedzi
2017-03-28 18:03 Redmine Rails server stack level too deep error »
Just cloned a Redmine source code from github using git clone git://github.com/redmine/redmine.git, then run gem install bundler and bundle install. A...
(1) odpowiedzi
2017-03-28 17:03 Select sum and dynamic where statement query in Rails 4 »
I have this below statement in my controller and I want to know how to rewrite it in Rails 4 Entry.find(:all, :conditions => [@conditions.keys.joi...
(2) odpowiedzi
2017-03-28 11:03 Broken FB-omniauth after bundle update, invalid credentials »
The oauth data doesn't go to controller action. Can't understand what's wrong. There is one more auth provider in this controller and it works well th...
(2) odpowiedzi
2017-03-27 23:03 as_json ignoring second part of .where() clause »
I'm trying to produce a json structure from an existing database that contains 5 tables: :users :resources :quiz_questions :quiz_answers :quiz_respons...
(1) odpowiedzi
2017-03-27 21:03 change value of param based on input value passed »
I have controller as follows def city params.require(:id) begin @data = @user.city_details(Integer(params[:id]), ...
(1) odpowiedzi
2017-03-27 17:03 Ruby On Rails 4.2 End Of Life »
Has an End Of Life date been decided on for Rails 4.2? I am trying to determine when is the deadline for upgrading my product to Rails 5 before there ...
(2) odpowiedzi
2017-03-26 20:03 how to catch param conversion error in rescue »
I am learning ruby and working on something. I have controller.rb def city params.require(:id) begin @data = @user.city_details(Integer(param...
(2) odpowiedzi
2017-03-26 19:03 Avoid custom route duplication for Single Table Inheritance »
I have a couple of types of Users (Mover and Movee) created using Simple Table Inheritance. I am following a similar approach of passing in type in m...
(1) odpowiedzi
2017-03-26 13:03 Sidekiq worker for deleting items »
I created two tables (models), first for Items, second for Item pictures (Item and ItemPicture) - (belongs_to relation). It can happen that picture ma...
(0) odpowiedzi
2017-03-26 03:03 how to catch conversion of param in rescue and dont catch model errors »
I have controller.rb as follows def lesson params.require(:lesson_id) begin @result = @user.lesson_details(Integer(params[:lesson_id]), ...
(2) odpowiedzi
2017-03-25 22:03 Rails Database Query ROR »
First of all, I am still new to ROR and I am trying to come up with more efficient way to do a database query for my datatables. My Model association...
(1) odpowiedzi
2017-03-25 20:03 Rails files upload on production »
I trying to upload an image on my local server with carrierwave there are no errors. But when i've tryed to upload same image on my production server ...
(1) odpowiedzi
2017-03-25 20:03 MIgration Error in Rails 4 »
i was using sqlite 3 database previously,but when i switched to mysql,i am getting the following error.All my database is migrated i am getting ...
(0) odpowiedzi
2017-03-24 22:03 Why is Heroku push failing from Cloud9? »
I signed in to Heroku through my Rails app but when I go to push, I get this error: -----> Ruby app detected -----> Compiling Ruby/Rail...
(1) odpowiedzi
2017-03-24 14:03 How to execute Model Method name in where query? »
I have users table that has first_name and last_name. On my user index page, there is a text field for first_name and last_name search. If I search ...
(1) odpowiedzi
2017-03-24 10:03 How to add JavaScript based on some ruby conditionality? »
I want to add some JavaScript based on some ruby conditionality. How can i do that? For example <%= if current_user.role == "User" %> Adding...
(1) odpowiedzi
2017-03-23 18:03 How do I add a "New" button to ALL ActiveAdmin show pages? »
When creating objects in ActiveAdmin I typically need to add multiple, and wish there was an option to add another object on the show page (which appe...
(0) odpowiedzi