How do I create two buttons that generate CSV files with different attributes?

3
Rails
Hello, I have two questions: 1) I would like to create a button that can generate a CSV file with one set of attributes, and another button that will be able to generate a different set of attrib...
Steve replied
Solved

Proper location for null objects

2
Ruby
I've recently watched couple of screencasts on using Null Object Pattern: https://www.rubytapas.com/2017/01/31/two-screencasts-two-ways-eradicate-ruby-nil-values It was a good reminder about a ques...
Dan LeGrand replied
Solved

why my rails server logs show rendering a page two times, it that normal or there is something wrong with my code? Should it be only single time?

6
Rails
Processing by Users::HomesController#welcome as HTML Processing by Users::HomesController#welcome as HTML Rendering users/homes/welcome.html.erb within layouts/application Rendering users/homes...
naveen kumar replied
Solved

Error monitoring and notification for RoR

4
Servers
I'm helping on a small RoR app. I need to set up error monitoring for it. `errbit` or `exception_notification` both look pretty good. This is a small app right now (< 200 users with logins, p...
Ashley Engelund replied
Solved

why there is no crsf token when i use remote true with data type as "script" ? How this is different from ajax?

1
Rails
<%= select_tag "event[#{inquiry.slug}]", options_for_select([ "PENDING", "CONFIRMED" ], inquiry.status), :data => {url: update_status_vendor_inquiry_path(inquiry),method: "put", type: "script...
Chris Oliver replied
Solved

How did you become good at back end development / Ruby on Rails?

7
Rails
My introduction to Ruby on Rails was a "complete course" on Udemy and reading Michael Hartl's book. A year's worth of dedicated practice later, I'm still struggling with my skills and understandin...
Alan Reid replied
Solved

has_many :through association woes

10
Rails
I have a has_many :through relationship between a few models that *almost* works. My goal is to allow users to be assigned to projects and/or tasks. Everything seems to work except user_id's are n...
Adrian DeGus replied
Solved

API design/routing with nested resources

4
Tips
Hey all! I'm just curious, how would you surface the ability to create nested items in an API? Say you have a model `Post` that `has_many observations`. I have my base routes for both Post and Ob...
Chris Oliver replied
Solved

How do I debug why my ActionCable broadcast is returning nil?

4
Rails
Following along with the ActionCable Series. So in **irb** when i run the `ActionCable.server.broadcast "notifications:4", {html: "Hello"}` it comes back with **nil** instead of returning **1**. ...
Matt Taylor replied
Solved

Solutions for high memory usage in rails development or production(heroku)

18
Servers
So i built my web app that allows users to chat with eachother, see who's online, and send notifications all using actioncable and it's using up A LOT of memory it seems. Correct me if i'm wrong, b...
shakycode replied
Solved

How do I add a default time of 6:45pm

1
Rails
Hi Following on from the my previous post I want to add a new time column with the default of 6.46pm I have tried this class AddUsualStartTimeToAreas < ActiveRecord::Migration def change ...
Neil Patel replied
Solved

Retrieve all Project Threads where a given users has posted a Project Post

3
Ruby
A user belogns to a ProjectThread. And a ProjectThread has_many Users through ProjectPosts. On the Project Thread Index I want to display only threads where a given users has posted a Project Pos...
Jacob Montgomery replied
Solved

Problem associating nested resource with Devise current_user method

4
Rails
I need to assign the current_user ID to all new projects, tasks and comments created in my app. I got projects and tasks working fine, but for some reason comments are giving me trouble. Here's wh...
Adrian DeGus replied
Solved

How do i print out validation error?

6
Rails
So i'm going through building the forum series and whenever i submit the form, it is just re-rendering the new form page. I looked in my server logs and I see that `Parameters: {"utf8"=>"✓", "au...
Matt Taylor replied
Solved

[Feature Request] Ask for Topic/Episodes/Series

2
General
So hello guys, All of us have great ideas, and all of us want to know whats next episode would be. So this is my idea. List of Topics with likes. Everyone can enter the topic that would like mor...
Jorge Dominguez replied
Solved

How is routing done with a conditional in url?

5
Rails
Not sure the correct words to ask the question are. Here is an example from what I have seen: `http://www.gorails.com/series/1?old_content=true` So say Chris re-did some of the screencasts,and now...
Matt Taylor replied
Solved

How do I check if runner.interest is not null in this interpolation?

5
Rails
hi i am working on this interpolation where the runners has interests but lets say the runner has not interests , or has not entered any interests how would we interpolate this Your runne...
Jacob Montgomery replied
Solved

has_and_belongs_to_many associations

6
Rails
Im building an app where a `User` belogns to several projects. Is this a good approach to create a "join table" that just tracks which `Projects` are connected to which `Users`? Is the `Collaborati...
Lauro replied
Solved

How to make form fields to display placeholder text?

11
Rails
I'm working on a project management app that is organized into 3 panes: Project list | Task list | Task details views/_sidebar: has a form to create projects projects#show: has a form to create t...
Alan Reid replied
Solved

How Do i add an "Are You Sure?" button in my update controller

3
Rails
Hi I want add a pop up button that says "Are you sure" when the user clicks on submit ? if it was a destroy mehod it would be something like this method: :delete, data: { confirm: "Are you sure?...
Neil Patel replied
Solved

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.