Data dodania Pytanie
2017-04-22 21:04 Stopping counter with rails-timeago »
I am timing a task from the date with the gem rails-timeago. The count appears in the view and I use the following code for this: <% = Timeago_tag...
(1) odpowiedzi
2017-04-22 21:04 In a rails 4 app I am having trouble passing the csrf token with an answer in jquery »
Page html: <head> ... <%= csrf_meta_tags %> ... </head> jquery: $(".on_click").click(function() { $("#spinner").show()...
(1) odpowiedzi
2017-04-22 17:04 Rails carrierwave resize only one image »
i do multiple upload of images with carrierwave, also resize. For example, i've uploaded 10 images, and carrierwave has create 3 version of any image ...
(2) odpowiedzi
2017-04-21 18:04 "NameError: wrong constant name" after upgrading Rails 3.2 to 4.2 »
I'm upgrading a Rails app from 3.2 to 4.2 and when running tests, I'm getting NameError: wrong constant name (that's the full error message, nothing s...
(2) odpowiedzi
2017-04-21 18:04 Rspec: testing model class method »
I am trying to test the model class method. here's how model looks like class Abc class Dbc < ActiveRecord::Base self.table_name = 'vSomeVie...
(1) odpowiedzi
2017-04-21 17:04 Join Two Result Sets in Rails 4 »
How do you perform a left outer join on two ActiveRecord::Relation results in rails? Given: sales = DailySaleItem.joins(:daily_sale).where("daily_sa...
(0) odpowiedzi
2017-04-21 09:04 Unpermitted parameter when trying to update record »
I have two models, ProjectCategory and ProjectQuestion. A ProjectCategory can have many questions related to it, and a ProjectQuestion can only have o...
(1) odpowiedzi
2017-04-21 01:04 Rails 4: Model Associations are not working »
My associations in Rails 4 are not working review.rb class Review < ActiveRecord::Base belongs_to :movie, :class_name => "Movie", :foreign_k...
(1) odpowiedzi
2017-04-21 01:04 I want to get the data from many to many table »
I want to get the data from many to many relationship table (Tag-Service-Category) like this below in tag/show.html.erb. class Tag < ActiveRecord:...
(1) odpowiedzi
2017-04-20 19:04 Format Months in Rails views »
In the rails console I can put in: 3.months => 3 months 1.months => 1 month I would like to have this output in my views as well, I tried: &...
(1) odpowiedzi
2017-04-20 19:04 Rails view helpers and formatting very long lines in html.erb files »
Some of my html.erb files are very long. Due to multiple attributes and sometimes conditions. For example: <div class="comment-container"> &...
(1) odpowiedzi
2017-04-20 16:04 Ruby [BUG] object allocation during garbage collection phase »
I am running a Rails app on AWS with Nginx (1.4.6) and Puma (2.15.3). My Rails version is 4.1.5 and ruby version is 2.2.1p(85). We have come across a ...
(0) odpowiedzi
2017-04-20 14:04 Search in jsonb and array combination in postgres with rails4 stored_accessor »
I have a model called Event, where I have stored_accessor "list" (stored like data: {"list"=>[{"key"=>"key1", "value"=>"value1"}]}). I need...
(1) odpowiedzi
2017-04-20 10:04 Instances of a model belonging to the same model Rails »
I have planned to build a complex sidebar menu with several layers of nesting, which displays links to different types of pages. Hence the model clas...
(2) odpowiedzi
2017-04-19 12:04 Dropzone JS Unpermitted Parameters In Rails 4 »
I've been struggling with this issue all night. I'm trying to upload multiple "Photo" models with Dropzone.js with the paperclip attribute "attachment...
(1) odpowiedzi
2017-04-19 09:04 How to fetch data based on multiple key pair in Postgresql + Rails4 »
I have a table XYZ which has few columns in which, I need to filter out resultset based on Two columns (col1, col2) requested params Request params l...
(1) odpowiedzi
2017-04-19 07:04 How do I make certain pages of my ruby on rails application inaccessible to one of my STI based Devise User model types? »
I want one pages of my ruby on rails web application inaccessible to one of my STI model types. I have two models typeA and typeB inheriting from User...
(2) odpowiedzi
2017-04-19 04:04 Capybara InfiniteRedirectError »
I am getting the same behavior whether it's in the browser or running rspec... How can this issue get resolved? I have tried removing the before_fil...
(1) odpowiedzi
2017-04-19 01:04 Validate form in rails when the user only enters spaces »
I need to validate some fields so that it does not accept pure white spaces, that is, if the user only put spaces that throw an error to him. This is ...
(1) odpowiedzi
2017-04-18 23:04 how to get single latest record from a view and test it in console »
I kinda have 2 questions. I have following model and method to get the latest record from view. but when i try to test in console i get error undefine...
(2) odpowiedzi
2017-04-18 19:04 How does count work in Ruby when a string is set as the parameter? »
How does count work in this code: name= "abcdef" puts name.count("aeiou") puts name.count("^aeiou") Does it count for the occurrences of "a", "e", ...
(1) odpowiedzi
2017-04-18 10:04 Postgres migrate uuid column type with default value doesn't work »
My migration is class AddUuidToUsers < ActiveRecord::Migration def change add_column :users, :uuid, :uuid, null: false, default: 'uuid_gener...
(1) odpowiedzi
2017-04-18 10:04 put object to a specific folder in aws S3 ruby »
I was trying to upload files using Aws sdk rails gem. Everything is successful except I can not find a way how to upload files to a specific folder ...
(1) odpowiedzi
2017-04-17 17:04 Rails Engine - NameError: uninitialized constant »
I'm creating a Rails Engine Classification, in which I have the Class Passion and a Concern Passionable. I have also another engine Post, where I in...
(1) odpowiedzi
2017-04-17 08:04 Sidekiq process dies silently »
I have 2GB droplet on Digital Ocean and things seem to be working until last week and all of sudden my sidekiq processes seems to be disappearing enqu...
(0) odpowiedzi
2017-04-17 02:04 Couldn't find Product with 'id'=search »
I'm just starting with RoR and i got an issue. Earlier, I asked hear and nobody could fix it. I would like to make a simple search form, where i wo...
(2) odpowiedzi
2017-04-16 21:04 Rails: Object saving in console but not within app »
I know this must be a dumb error somewhere, but I've been going in circles trying to figure out why my objects only save within the console, and not i...
(1) odpowiedzi
2017-04-16 16:04 Unable to run rake db:migrate or any other db related actions »
Good afternoon, We are trying to upgrade our application to Rails 5. The first step is to migrate from Rails 3.2 to Rails 4 (yes we are a bit behind)...
(1) odpowiedzi
2017-04-16 10:04 Rails 4 How to validate the number of nested attributes(multiple image/picture) using carrierwave »
i'm new to stackoverflow & Rails. I have three models, User, Post, post_attachment(Create post_attachment scaffold). What i want to do is , every ...
(1) odpowiedzi
2017-04-15 16:04 Why is my Javascript returning null Record for cities when i select my State in Rails app, using city state gem »
I have been struggling to figure out why I am getting empty array and not getting results back for the cities when state is selected. I follow the blo...
(1) odpowiedzi
2017-04-15 15:04 User level ruby on rails scaffold »
I did a project in RoR with scaffold, and I need that the users can only read my scaffolds and I, as admin, have the CRUD (Create, Read, Update, Delet...
(0) odpowiedzi
2017-04-15 00:04 How to restrict a has_many relationship to only 1 for a certain sub-type »
I have a few models that have a has_many through relationship. class Participant < ActiveRecord::Base has_many :participant_scores has_many :g...
(1) odpowiedzi
2017-04-14 19:04 undefined method test for MyModule »
I have following unit test. I am trying to test the exec method in MyModule::Base so i am trying to access it from another class method test. I am not...
(0) odpowiedzi
2017-04-14 16:04 Rails. Rewrite clearance controllers »
I try add js in clearance controllers. Users-controllers rewrite ok, but sessions and passwords controllers not work. user_controller (work): class...
(0) odpowiedzi
2017-04-14 14:04 how to call class method in rspec »
I have following class method module Abc class Def class << self include Ghi::Lmn def mymethod(*args) puts 'class metho...
(2) odpowiedzi