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 11:04 Hello everyone, my blog app with paperclip gem throws error while pushing it on heroku »
remote: ! remote: /app/tmp/buildpacks/f6d48d8a14fccbb19c0c0402fca224929d18e9ee042b3e204bc5992612e990d3b3a0fb1f9627b1a3bae11e9fa20dffc96e136bd734a2f3c...
(1) odpowiedzi
2017-04-22 07:04 mini-profiler is not working »
in the console of browser it shows error:- "NetworkError: 500 Internal Server Error - http://localhost:3000/mini-profiler-resources/includes.js?v=12b...
(0) odpowiedzi
2017-04-21 16:04 Ruby on Rails: how to copy objects from one category to another »
I'm trying to copy some latest recipients (subscribers) to a new category in my newsletter app. I ran following lines of code in Rails console but ins...
(1) odpowiedzi
2017-04-21 14:04 Rails nested fields_for with has_many relationship »
Rails: 3.2.18 I am attempting to build a nested form which accepts attributes for a has_many relationship. In this case the form is for a Listing whi...
(1) odpowiedzi
2017-04-21 14:04 Rails: Allow one session to be :pinned at a time »
I'm working on pinning a session for a company to the top of a list. A company should be able to pin a single spark session to the top of their list...
(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 16:04 Building a shopping cart with rails »
New to rails. I have seen several tutorials online, but am unable to get a simple shopping cart functionality. Following is my code and the error i am...
(0) odpowiedzi
2017-04-20 15:04 error while gem install rails Permission denied @ dir_s_mkdir - /var/lib/gems »
$ gem install rails Fetching: concurrent-ruby-1.0.5.gem (100%) ERROR: While executing gem ... (Errno::EACCES) Permission denied @ dir_s_mkdir - /...
(0) odpowiedzi
2017-04-19 03:04 Rails How make a conditional inside a method on the model »
I'm trying to make that just the user can feedback on a feedback method in the feedback model. but in the logs shows NoMethodError (undefined meth...
(2) 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 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 14:04 Grape entity multiple class inside module not loading »
Currently i'm using grape and grape entity, the current following structure works fine. # app/api/proj/api/v2/entities/committee.rb module PROJ::API:...
(0) odpowiedzi
2017-04-18 12:04 Rails, nested has_many association, finding sum of field of last children of each »
I have nested models like (using PostgresSQL) class User has_many :pages end class Page has_many :details belongs_to :user end class Detail ...
(1) odpowiedzi
2017-04-17 15:04 Add sum array to active record object where something equals something »
I want to sum my amount column plus display my original activerecord object together where my @val emp_no = @sell_back emp_no. Question is how can I c...
(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 14:04 syntax error, unexpected keyword_ensure, expecting ')' syntax error, unexpected keyword_end, expecting ')' »
i am getting these errors in my rails project when i add a new product " show.html.erb:52: syntax error, unexpected keyword_ensure, expecting ')' sh...
(1) odpowiedzi
2017-04-15 15:04 grape each entity in a single file »
I want to have multiple classes inside grape entity file, this is the folder structure app/api/proj/api/v2/entities/committees.rb module PROJ::API::V...
(1) odpowiedzi
2017-04-15 05:04 Rails f.select Save Id an Name at the same time »
I have a form with the f.select option. I want to add the Company ID and the Company Name when the company name is selected from the options. Is it po...
(2) odpowiedzi
2017-04-14 02:04 why cause undefined method `empty? on rails? »
I'm trying to loop on a related model and i have no idea why in the log is showing this undefined method `empty? Does someone have an idea why?...
(0) odpowiedzi
2017-04-13 09:04 Spring REST oauth2 API + Ruby on rails 2.3.0 »
I am calling Spring rest oauth api from ROR with is giving response as follows { "access_token": "22cb0d50-5bb9-463d-8c4a-8ddd680f553f", "tok...
(0) odpowiedzi
2017-04-13 05:04 Rails Application#call is very slow »
I'm seeing this Application#call take anywhere from 500 to 1500ms on every call which is soaking up memory on my Heroku dynos and causing timeouts. A...
(2) 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 13:04 sort_link with Polymorphic Relationship + Ransack »
I have one polymorphic relationship class Offer < ApplicationRecord belongs_to :offerable, polymorphic: true end class Company < Application...
(0) odpowiedzi
2017-04-12 11:04 How to make a recursive mkdir with Rails SFTP? »
Is it possible to create multiple level directories like /2017/04/11/ on a FTP Server via sftp.mkdir! "/2017/04/11"? It returns Net::SFTP::StatusExce...
(0) odpowiedzi
2017-04-11 08:04 How to set up Token Authentication properly in Rails? »
I am trying to make an API for a project. I followed instructions from this video - https://www.youtube.com/watch?v=lgdUqtw4weg&t=165s Basically ...
(1) odpowiedzi
2017-04-11 08:04 Rails Devise - Update User with Associated Model »
Good day, I have a devise users model and in edit user page I want to add a custom field called "add verification documents" which takes in multiple ...
(0) odpowiedzi
2017-04-11 00:04 Rails how to Render a form instead of redirect on submit? »
I have a form that the results just show if render instead of redirect. so the form must not be redirected. someone know if this is possible with rai...
(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 19:04 How to implement citrus payment gateway in rails application? »
I want to integrate Citrus payment gateway in my rails 3 application. I got this link But steps are not provided here. Please help me in integrating...
(0) odpowiedzi
2017-04-10 03:04 Passing some relations of a table by variant ruby on rails »
I'm not sure if it's possible to do this but I'm importing different CSVs into multiple mySQL tables so I use multiple functions to do this import. ho...
(1) odpowiedzi
2017-04-09 17:04 Ruby on Rails loop executing 2 times »
I have this rails3 loop: <div class="row"> <% recipes.each do |recipe| %> <div class="col-md-3"><%= image_t...
(0) odpowiedzi
2017-04-09 05:04 Ransack undefined method `empty?' »
i'm trying to get a collection of feedbacks from the shop but using ransack and search and comment_cont from feedbacks and the logs show: ActionView...
(1) odpowiedzi
2017-04-07 19:04 Sort Nested Data Structure »
Given a nested hash (see below) I would like to sort siblings which have a ':position' attribute. In the hash below you can see the child and child_...
(2) odpowiedzi
2017-04-07 13:04 upgrade ruby on rails on mac sierra error »
I'm having problems to update my ruby and install rails, everything seems to be installed brew install rbenv ruby-build Warning: rbenv-1.1.0 already...
(1) odpowiedzi