Data dodania Pytanie
2017-07-20 19:07 Passing value params from one method to another method rails »
I have a method: index that gets the value of the checkbox per post def index session[:post] = params[:checkbox_array] end The value of params[:c...
(1) odpowiedzi
2017-07-20 17:07 Add custom name to time_zone_select field in Rails form »
I want to add a custom name to a select field in my Rails form. The field is generated using the time_zone_select form option helper. I used 'name'=&g...
(1) odpowiedzi
2017-07-20 15:07 Inserting a space after appending multiple actions in activeadmin »
I'm having an issue while trying to append multiple actions in the index page in activeadmin. I used this code to append two actions in activeadmin....
(1) odpowiedzi
2017-07-20 14:07 Rails how to organize views »
I have one app with two different views per controller. So I want to have mysite.com/old/accounts should be rendered old templates. At mysite.com/ne...
(1) odpowiedzi
2017-07-19 15:07 Rails 4 Conditional Elastic Search, adding a select field to the index for searching »
I have a automotive production website, that i was tasked to add to the UI and using an existing elastic search, the new select input must filter the ...
(0) odpowiedzi
2017-07-19 15:07 Rails Spring configuration similar like in Zeus? »
I have something like this in Zeus custom plan, where I run some rake tasks: require 'zeus/rails' class CustomPlan < Zeus::Rails def rots `...
(1) odpowiedzi
2017-07-19 07:07 Render custom layout instead of application layout »
When an error occurs during create process, render new action is invoked. I need to display the custom layout for new. Instead it is displaying the ap...
(2) odpowiedzi
2017-07-18 17:07 ActiveModel::Serializer - How can I catch and handle errors for individual resources during collection serialization? »
In a rails application, I have a collection I'd like to render as json. Some of the items in the collection may not successfully serialize due to err...
(0) odpowiedzi
2017-07-18 13:07 Includes associated objects without reloading current instance »
I'm trying to find a way to load associated objects to my current instance of user. I've an instance of user which I want to pass to a service for bu...
(0) odpowiedzi
2017-07-18 12:07 Uncaught exception: No such file to load -- aws-sdk »
I have a spree customized application in rails 3 which I want to upgrade to rails 4 then to rails 5. I have updated almost all the gems to the recent ...
(0) odpowiedzi
2017-07-17 18:07 Facebook login by omniauth on heroku is not working »
I built an app with Facebook login function by Rails which perfectly worked on localhost, but now it doesn't work on Heroku. It looks like a common pr...
(2) odpowiedzi
2017-07-17 16:07 In place editing for multiple tags in rails 4 app »
I'm trying to get in place editing working for multiple tags in a rails app. I'm using the best_in_place gem for this, currently I have the code below...
(1) odpowiedzi
2017-07-17 14:07 Delayed job: uninitialized constant error »
I am trying to save pdfs using delayed job. Here is what have done so far. gemfile gem 'delayed_job', '~> 4.1', '>= 4.1.3' gem 'delayed_job_a...
(0) odpowiedzi
2017-07-16 12:07 Ruby on Rails - Generating random number that does not exist in database »
In my application I have a Case model & every case generated by user has a case_number. case_number is generated from my Case model. Currently Im...
(2) odpowiedzi
2017-07-16 09:07 ActiveRecord - Querying association with multiple condition pairs »
Here's some context with a small Database Schema Order -> id LineItem -> id -> order_id Transaction -> id -> transaction_typ...
(2) odpowiedzi
2017-07-16 08:07 Rails: Single-table inheritance with many-to-many self-join relationships between records »
I am modeling a learning web app with two distinct roles, Teachers and Students. There is a lot of common behaviour between both and it makes sense to...
(1) odpowiedzi
2017-07-15 20:07 iterate over a multidimensional array and print all possibility »
i try to iterate over a multidimensional array to print all possible choice. I dont understand why i cant print the second params2 from the first arra...
(1) odpowiedzi
2017-07-15 06:07 NoMethodError in controller »
Hello I'm new at Ruby and I'm trying to make a method in my Project controller like so: def update_phase @project = Project.find(params[:id]) ...
(1) odpowiedzi
2017-07-15 06:07 How to achieve concept of connection list with minimal cost using rails ActiveRecord? »
Say User A is connected to B, then user B is automatically considered to be connected with user A. User has_many connection Connection Table: id, ...
(1) odpowiedzi
2017-07-14 23:07 OmniAuth Facebook dos not return E-Mail in Rails 5 »
This question is already on SO but since the API and Gem version changed I wanted to ask again and hope to find an answer this way. I am using Rails ...
(0) odpowiedzi
2017-07-14 23:07 After Upgrade To JRuby 9.1.9.0, Rails CookieStore Very Slow When Handling Encrypted Cookies »
I recently upgraded a JRuby 1.7.x based Rails 4.2.5 Web application to JRuby 9.1.9.0. When I deploy the to a web server, page loads take up to 60se...
(1) odpowiedzi
2017-07-14 05:07 Undefined method in controller (Routing) »
I'm new at rails and I'm currently working on an already existing application that handles butons like so: <%= link_to 'Edit', edit_answer_path(an...
(2) odpowiedzi
2017-07-13 23:07 Rails 4 Autocomplete & Devise »
I'm using the autocomplete gem in my app, and now that I've switched authentication from bcrypt to devise I want to have autocomplete in my signup for...
(0) odpowiedzi
2017-07-13 22:07 How can an inherited controller add to parent's before_action conditions »
class ParentController < ApplicationController before_action admin_user, only: [:create, :update] end class ChildController < ParentControlle...
(2) odpowiedzi
2017-07-13 14:07 Rails send_file/send_data sends pdf file without content »
I am generating a pdf file using WickedPdf.new.pdf_from_string. File itself generates fine, when saved in disk and opened. But when same file sent vi...
(0) odpowiedzi
2017-07-12 17:07 How to model a doctor and patient appointments in rails? »
Rails and stackoverflow beginner here so please pardon me for any mistakes. I am developing an appointment booking system between doctors and patient...
(0) odpowiedzi
2017-07-12 15:07 config/environments/development.rb command not found »
I would like run a gitlab ruby on rails project. After cloning I would like to build up the environment but there is permission problems. config/envi...
(2) odpowiedzi
2017-07-12 12:07 Rails/MySQL ActiveRecord::RecordNotUnique »
I have this confusing error message ActiveRecord::RecordNotUnique This is my model: artisan.rb : class Artisan < ActiveRecord::Base require 'cs...
(1) odpowiedzi
2017-07-11 19:07 Carrierwave file upload in modal window »
I am using carrierwave for my file uploads in Rails 4. It seems to work normally. But in one case I am trying to use it in a modal window. But it does...
(0) odpowiedzi
2017-07-11 16:07 Append a hash to a GET endpoint's query params in Rails »
I'm integrating with a 3rd party service for which the complete URL string of a GET request needs to look something like: <URL>/some_endpoint?J...
(3) odpowiedzi
2017-07-11 15:07 Create form in Rails for multiple instances of has_many relationship »
I have a model hotel.rb which have accepts_nested_attributes_for :rates and has_many :rates relationship. I want create a form for when I create a ne...
(0) odpowiedzi
2017-07-10 17:07 Activerecord callback, previous_changes vs. changes »
I'm trying to understand what the difference between these two methods is. Here is the documentation for each: https://apidock.com/rails/v4.2.7/Activ...
(1) odpowiedzi
2017-07-10 16:07 redirecting from other functions »
I have this method in the controller def all_save method 1 method 2 method3 respond_to do |format| format.html { redirect_to :action =&g...
(0) odpowiedzi
2017-07-10 11:07 Keep url params »
I'm pulling the following params: <%= link_to "Sign up", new_store_registration_path(:plan_id => plan.id, :price => plan.price) %> Aft...
(1) odpowiedzi
2017-07-09 22:07 Activerecord sort OR query by best match »
I have a User model with first_name and last_name attributes. I want to write an api where a user can be searched either by first_name, last_name, or ...
(1) odpowiedzi