Data dodania Pytanie
2017-08-13 18:08 Filter by user.id using collection_select for drop down in form »
My first SO posting. Finally found something that has stumped me and after 6+ hours, I've decided I need some help, before I lose my mind. I'm trying...
(1) odpowiedzi
2017-08-13 16:08 How to "Remove query string from external resources" in Ruby On Rails? »
I am trying to boost speed. I tested on gtmetrix and got the following results: There are some plugins for this in Wordpress, but I don't know how ...
(1) odpowiedzi
2017-08-13 06:08 How to allow users to be able to upload to my google drive in rails app and then provide them a preview link for google doc in the app? »
I need my rails app users to be able to upload to my google drive folder. He should click browse file button and after submission, the file should be ...
(1) odpowiedzi
2017-08-12 17:08 Rails Optimize query and loop through large entity »
I have a method that outputs the following hash format for charting. # Monthly (Jan - Dec) { "john": [1,2,3,4,5,6,7,8,9,10,11,12], "mike": [1,2,...
(1) odpowiedzi
2017-08-12 15:08 Delete Rails 4 query cache »
I want to delete Rails query cache. My query is like def all_articles articles = Articles.all articles.clear_cache! end But,when I checked Ra...
(1) odpowiedzi
2017-08-12 01:08 Having to change paths within vendor libraries - Rails Asset Pipeline »
What's the best practice for loading third party Javascript libraries (into the asset pipeline) that have references to images and css? My concern is ...
(0) odpowiedzi
2017-08-11 19:08 sending email not working with rails »
I built an example app to try to make the mailer work. The app is hosted on https://blooming-brushlands-80122.herokuapp.com, and the source code is he...
(1) odpowiedzi
2017-08-11 15:08 Devise different layouts for sign up and user settings page »
I am using Devise 4 and Rails 5. For my sign up page I have one layout and for the registration edit page another layout. I think this is very common...
(0) odpowiedzi
2017-08-11 14:08 Preview mails in staging server on rails 4 »
I have a staging server where I want the designers to be able to preview the email design. I have used rails 4 feature and I am able to access the mai...
(1) odpowiedzi
2017-08-11 11:08 sort mini test in rails »
I'm new to rails and i've done a simple sorting of dates in descending order. and now i need to write a test for it. my controller looks like this de...
(2) odpowiedzi
2017-08-10 23:08 Sort with ransack gem using query »
I need sorting records, I used the ransack gem with single data in a single table, but when I use querys that involve several tables in the database I...
(1) odpowiedzi
2017-08-10 19:08 Adding multiple products to cart in Spree store (Rails 4.2.5.2 / Spree 3.1.0) »
I'm trying to create a section on the Product show page that will display 3 products, with checkboxes beneath them, and a button to add the selected o...
(1) odpowiedzi
2017-08-10 18:08 How to configure travis with Rails when 2 databases are specified? »
I have a Rails application, running Rails 4.2.1. It's using the secondbase gem to define 2 database connections. When I deploy changes to a branch, i...
(0) odpowiedzi
2017-08-10 13:08 Inline CSS is not working with gem 'htmltopdf' »
My requirement is to download docx file and should be open on Microsoft word: I am using following gems: gem 'responders' gem 'htmltoword Controll...
(1) odpowiedzi
2017-08-10 11:08 rake aborted! ActiveRecord::RecordInvalid: Validation failed: Email can't be blank, Password can't be blank »
I am getting an error while doing heroku run rake db:seed rake aborted! ActiveRecord::RecordInvalid: Validation failed: Email can't be blank,...
(0) odpowiedzi
2017-08-09 19:08 How can we write regular expression for strings with two periods »
I'm looking to write a regex which accepts only ".wms" files. My current regex is " /\.(wms)$/i " I'm using this is Rails Model validation and I'm ...
(3) odpowiedzi
2017-08-09 19:08 check the AND OR conditions for the return statement »
how do i write this below expression? I want to return false when the user is not admin AND when the user_id does not match the current_user_id OR the...
(1) odpowiedzi
2017-08-09 13:08 Ruby on Rails - Seeding big data (over 2.7M) record to production database »
In my application I have a City model. I have a sql file that contains all the cities in the world (its over 2.7M) & I need to seed all of them to...
(3) odpowiedzi
2017-08-08 18:08 Rails 4 ActiveAdmin CSV export yields "You are not authorized to perform this action." in browser »
I am using "out of the box" installations of Devise gem and ActiveAdmin gem in my Rails 4 project. I have an ActiveAdmin model that works fine as an i...
(1) odpowiedzi
2017-08-08 15:08 Rails_admin capistrano deploy error »
When I deploy my project i have some errors 00:19 deploy:migrating 01 ~/.rvm/bin/rvm default do bundle exec rake db:migrate 01 rake abort...
(0) odpowiedzi
2017-08-08 13:08 index is getting called instead of show »
I'm trying to write an API using Ruby on Rails. In my controller class index method is getting called instead of show. Although I am passing parameter...
(2) odpowiedzi
2017-08-07 17:08 Stringify error in rails »
I have this array of hashes: object = [ {:user_id=>9, :timesheet_project_id=>4, :timesheet_task_id=>87, :date=>"2017-08-23", :time_spen...
(1) odpowiedzi
2017-08-07 16:08 How to find the keys which has false values? »
I have this array: @import = [{"User"=>[9], "Project"=>false, "Task"=>false, "Date"=>"2017-08-11", "Time (Hours)"=>2.0, "Comment"=>...
(3) odpowiedzi
2017-08-07 16:08 Get all records that exist in both the tables »
Below are two tables with some sample data :- Uploads: id: 1 , file_ref:abc id: 2, file_ref: abc1 id: 4, file_ref: abc3 id: 5, file_ref: abc4...
(3) odpowiedzi
2017-08-07 09:08 How to use checkbox on form_with type »
<div class="field"> <%= form.label :course_type %> <%= form.check_box :ctype, {:id => "post_ctype"} %>checkbox 1 <%= fo...
(2) odpowiedzi
2017-08-06 06:08 Rails: How to add progress bars for image uploading using Paperclip »
I apologize for the newbie questions, still learning Rails. I'm using the Paperclip gem alongside Jquery File Upload Gem to handle my image uploading ...
(0) odpowiedzi
2017-08-05 17:08 .sum data from query »
I'm trying to .sum a field from the following query: def self.busqueda_general(params) query = select('venta.Id,venta.TOTAL') .distinct ...
(2) odpowiedzi
2017-08-05 16:08 Posting to the FB Wall with fb_graph2 Gem is not pulling OG information »
I am having an issue here. So I have a rails application that is using the fb_graph2 gem. My application allows users to share an article from my ap...
(0) odpowiedzi
2017-08-04 20:08 link_to with controller_name and action name not working »
I'm working on upgrading rails 3.2 app to rails 4.2. I have stuck with one issue. link_to with controller and action name not working <%= link_to ...
(2) odpowiedzi
2017-08-04 17:08 "comparison of Date with ActiveSupport::TimeWithZone" fails consistently after about two months in prod »
In a production app, the following code works in dev and (initially) in production: @employee.ident_expiration_date && @employee.ident_expira...
(0) odpowiedzi
2017-08-04 16:08 How to redirect a URI with a parenthesis in Ruby on Rails »
I'm trying to do a redirect in Rails 4 get '/something)', to: redirect("/something", status: 301), format: false This doesn't work because parenth...
(1) odpowiedzi
2017-08-04 04:08 How to track the User Activity in Ruby on Rails »
Is there any Gem or Method, which tracks the user behaviour on the site like whether the user has made the purchase of the site by landing on the doma...
(1) odpowiedzi
2017-08-03 20:08 How do I run a calculation in my ruby on rails model before the view is rendered? »
I have an application where users complete a number of tests. The results of these tests is then stored in the database. class TestOne < ActiveRec...
(1) odpowiedzi
2017-08-03 15:08 Collection Group by using same table's column »
I have record in database like below Table :Role ================ id: sub_category: main_category: 1 john student 2 ...
(1) odpowiedzi
2017-08-03 05:08 add attribute to .create in rails »
Lets say im saving an array into my model. Is there any way to add an attribute to it? I am running Property.create(property_params) to save the inst...
(2) odpowiedzi