Data dodania Pytanie
2017-01-28 11:01 how to create guest user to angular rails app without populate database? »
I have angular - rails web application. My web app is already in production mode.i'm using devise gem. I want to create a demo for Guest Users to logi...
(0) odpowiedzi
2017-01-28 00:01 How to handle nested params in rails controller. »
I have params that are coming into the controller looking like this: { invitee: { first_name: first_name, last_name...
(1) odpowiedzi
2017-01-27 22:01 Getting RuntimeError: "In order to use #url_for, you must include routing helpers explicitly" when I've already included them »
Inside a controller I've tried to run this code for when users that are already logged in stumble across the sign up page def index if current_user...
(1) odpowiedzi
2017-01-27 13:01 Perform strftime on created_at in pluck »
In Rails, how can I perform a .strftime on created_at in a .pluck? I'm simply trying to convert the created_at inline: Entry.where(client_id: @clien...
(1) odpowiedzi
2017-01-27 12:01 How does || work in?: @client = client.find(params[:client_id] || params[:id]) »
New to rails. Following a tutorial on polymorphic associations, I bump into this to set @client in create and destroy. @client = Client.find(params[:...
(4) odpowiedzi
2017-01-27 06:01 Update database column in rails »
I have a problem, I want to update my database's "active" column. my schema = tablename(name:string , id:int , active:0 ,created_at) I want to u...
(3) odpowiedzi
2017-01-26 16:01 How to index a polymorphic table in rails with unique “attendable_type” and “attendable_id” - Rails 4 »
Could one kindly please tell me where i am going wrong. How do you index a polymorphic table in rails with unique initial migration: class Cr...
(1) odpowiedzi
2017-01-26 14:01 Ruby on Rails - Different elements for each do slices »
In my application I do each_slice and then each_with_index because of some stuff I'm doing in my application. My current code is like this: - @image...
(1) odpowiedzi
2017-01-26 03:01 Rails 4 rspec test fails before code is run »
EDIT: My initial assumption was incorrect. It seemed like my test was hitting its assertions before it even finished running all of its code blocks, b...
(3) odpowiedzi
2017-01-26 00:01 Rails 4: User can only view their own orders »
I am giving clients the ability to place food orders through my app. They can view their order index by visiting the following URL: localhost:3000/c...
(1) odpowiedzi
2017-01-25 17:01 Ruby on Rails: How to validate if on specific page? »
In my Ruby on Rails application I am trying to add in validations that will ensure the user has entered a value in a text box. In my system I have a t...
(3) odpowiedzi
2017-01-25 09:01 Rails: How can I retrieve values from columns named `id`? »
Using Rails 4.2.6. I've got a table like this (please forgive the odd table & field namings -- they're from an ancient non-Rails project): mysql&...
(1) odpowiedzi
2017-01-25 06:01 Is it possible to find nearby cross street in New York using geocoder? »
How can i find cross street for a restaurant or building using geocoder like yelp? https://www.yelp.com/biz/am%C3%A9lie-new-york?osq=Restaurants 22 ...
(0) odpowiedzi
2017-01-25 05:01 select_tag not passing param »
My select_tag is suppose to auto post when a item is selected. It does but when I view the params in byebug I get a empty id in the params instead of...
(1) odpowiedzi
2017-01-24 21:01 Ruby on Rails: Display confirmation message if not includes »
In Ruby on Rails, is it possible to display a confirmation message if the user has not entered a string in a text field? I have a form whereby a user ...
(1) odpowiedzi
2017-01-24 20:01 Bignum to Fixnum ClassCastException error using mongoid under JRUBY »
I am having trouble with using Mongoid in a Rails app under JRuby. I can insert records and count records, but any attempt to query results in the fol...
(0) odpowiedzi
2017-01-24 17:01 How do you get a list from complex active record has_many involved from a subset of downstream objects »
I'm having a hard time getting a list of the games involved from a hierarchical parent relationship when multiple foreign keys are implemented on a re...
(2) odpowiedzi
2017-01-24 11:01 Double has_many attributes »
I'm beginner in rails and having trouble finding a proper way out with my problem. I have three models : Conversation, participant, messages which ha...
(1) odpowiedzi
2017-01-24 07:01 rails Validate has_many through »
I'm trying to validate has_many through association using the id or the validade associated method but, the log spits out! someone have any idea how ...
(1) odpowiedzi
2017-01-24 00:01 Why is ActionMailer failing? SMTP To address is required »
I'm racking my brain trying to figure out what the heck is going on here... I call BidMailer.confirm(Bid.last.id).deliver in the rails console and I'...
(1) odpowiedzi
2017-01-23 23:01 How to query comma separated values in Postgres string field? ROR / ActiveRecord »
I'm using Ruby on Rails 4.2.3 and I have two string fields in users table two_factor_secret_key and two_factor_recovery_codes. The first one has a str...
(1) odpowiedzi
2017-01-23 22:01 Ruby on Rails: In controller, retrieve data from text_field based on HTML ID »
In my RoR application, I am trying to create a form whereby users can update the fields of multiple records at once. To do this I have been following ...
(1) odpowiedzi
2017-01-23 12:01 Rails eager loading associations »
I have two models MSellingStaff and MPosition #m_selling_staff.rb class MSellingStaff < ActiveRecord::Base belongs_to :m_position end #m_posit...
(3) odpowiedzi
2017-01-23 05:01 validation with space in rails »
In rails form, I want to validate as "Should not enter space in starting of text field". That is no space comes in the beginning of the text field. Sp...
(1) odpowiedzi
2017-01-22 22:01 Unambigous behaviour during print in Ruby »
The print statement given below executes correctly when I remove the parentheses and produces an error syntax error, unexpected ',', expecting ')' whe...
(3) odpowiedzi
2017-01-22 18:01 Rails image_tag not using CDN Assets »
I've recently setup a CDN for my application, almost everything works fine, like my static assets, my JS and CSS. But some object assets (images) ke...
(1) odpowiedzi
2017-01-22 08:01 Rails predictor array_to_json »
I'm, trying to create a prediction of product using predictor gem and ip_address but rails spits out no such function: array_agg someone have ...
(1) odpowiedzi
2017-01-21 21:01 Rails show parent data in child index page »
See the code and what I mean in the picture how do i show the parent in the child index page? An example is the ID number 1,2,3,5 they are the child...
(1) odpowiedzi
2017-01-21 14:01 how to display all those users on map which are at particular distance away from the current user? »
I want to store user's current location when they log in and display only those users on map which are at a particular distance away from current_user...
(1) odpowiedzi
2017-01-20 21:01 How to convert img inline styles for width & height to attributes »
currently my images are displayed from my cms like so: I'm working to create AMP pages and they do not accept image dimensions in style. AMP pages ...
(1) odpowiedzi
2017-01-20 12:01 Rails - mongoid - create and override using key? »
I would like to know if there is any simpler (and faster) possibilities to create/override an item in my mongo databse by looking at a Key. Let me ex...
(0) odpowiedzi
2017-01-20 03:01 Given a Model.title, how to best query for all records with the first letter = X »
I have a table w 200 records. Each record has a title field which is populated. I would like to dynamically pull all records that start with a certain...
(4) odpowiedzi
2017-01-19 23:01 Parsing custom serialized object in Rails »
I am able to export a serialized text representation of an object from our proprietary CNC programming software and need to parse it to import objects...
(1) odpowiedzi
2017-01-19 17:01 Failed to connect to OpenTok(certificate verified failed) »
I created a video chat, used Opentok like this: in video_session_controller.rb file. require 'opentok' def show @video_session = VideoSession.fi...
(0) odpowiedzi
2017-01-19 04:01 Unpermitted parameters from nested attributes »
I've looked through every post I can imagine regarding this, but can't come across a solution. I have a Task with a nested resource of Task Products ...
(2) odpowiedzi