Skip to main content
How to compare and write conditions on active record field "time"
General • Asked by sid d
```ruby Fpclass(id: integer, name: string, start_time: time) Fpclass.first.start_time # 2000-01-01 01:01:00 UTC ``` I'm having problem with comparing time field while fetching result...
2
posts

CSV Model method and Summing Hours cleanly.
General • Asked by shakycode
I've made a bit of a mess with my timeclock functionality. Basically what I want to do is pass all of the records in a given search range (which I've already written a model method for and it's wo...
7
posts

Clarification needed for simple_calendar sort_by method
General • Asked by sid d
Hi Chris, I've seen `simple_calendar` ruby gem and i stuck at sort_by method (calendar.rb) ``` def events_for_date(current_date) if events.any? && events.first.respond_to?(:s...
3
posts

Video Idea: Accepting Credit Card Payments
Site Feedback • Asked by Michael Stitt
Most web apps need the ability to accept payments from their users (whether they're automated monthly payments or just simple one time payments). It was such a easy process getting going as a Pro ...
3
posts

jQuery and Turbolinks not playing nicely
General • Asked by shakycode
Ok, so I'll try to make this brief. I have a new Rails 4.2.1 app using Ruby 2.2.2 and I'm trying to do a live search on a basic crud model. I have ransack installed and it's working great. But...
1
post

Admin for the specific case
Gems / Libraries • Asked by Jan Lachowicz
Hello, I have a problem and just missing the solution. In my project I have user accounts made in devise that are connected to **Case** model through **Work** model (with *is_admin* boolean attri...
3
posts

Coffeescript Instantiation
Javascript • Asked by Chris Zempel
I've got a bunch of images thumbnails in an admin area. Wherever one appears, I'd like to be able to click on it, open up a modal with a form, and let the attributes of the image be edited from tha...
3
posts

Ransack undefined method path in Rails 4.2.1
General • Asked by shakycode
I'm working on a simple CRUD Asset Management app and I want to use Ransack. I think I have this setup properly in my view and controller but each time the index view is hit I get the exception: ...
2
posts

Ransack undefined method _path in Rails 4.2.1
General • Asked by shakycode
I'm working on a simple CRUD Asset Management app and I want to use Ransack. I think I have this setup properly in my view and controller but each time the index view is hit I get the exception: ...
1
post

Release GoRails platform subscribers or OSS?
General • Asked by Samnang Chhun
I'm not sure it's a good idea to release GoRails rails application only to subscribers or OSS. If so, we could benefit from some contributions on whatever features that you have planned to add or t...
3
posts

Code Challenge idea
General • Asked by shakycode
Chris and I were talking about starting a challenge/kata exercise for the community in Ruby/Rails. Based off of the idea of [Underhanded-C](http://www.underhanded-c.org/), we could post a weekly, ...
6
posts

Help needed on how to create spatial indexing
General • Asked by sid d
Presently i have a list of the places what i've looking for and latitude / longitude numbers for them and i come up with somewhere about spatial indexing to search for nearest locations within my ...
5
posts

Problems with Routes and Forms (Am I a Newb? What am I missing here?)
General • Asked by shakycode
I'm working on my TimeClock functionality for a legacy Rails 3.2.21 app and am running into problems with simple crud type forms. I'm trying to create a new ClockEvent entry using a basic form i...
4
posts

rubber:passenger:add_to_pool takes forever
Servers • Asked by Michael Victor
I'm using Rubber 3.1.0 with Capistrano 2.15.5 When I try to deploy my app(default rails-devise-pundit) to production on EC2, it goes on perfectly till command finished in 2849ms triggering a...
4
posts

Multi Site in Rails
Rails • Asked by rabin prithvi
Have a Rails app which acts as a API client. Request may come from 6 different domains. Each site will have same layout. Difference between each site would be the theme color , logo and the tex...
4
posts

Using scopes to rank users based on votes they get from their posts
General • Asked by Ariff Munshi
Hi all, I posted this question on Stack Overflow for a problem I am stuck at. http://stackoverflow.com/questions/30805987/using-scopes-to-order-users-with-most-votes-for-specific-time-periods ...
3
posts

Versioning question.
General • Asked by Brent C
I have a website where I would like to offer users the ability to edit the public facing data. However, after the data is edited I need to place the model in que for review. If edits are acceptable...
2
posts

filter child record by the parent.
Rails • Asked by Francisco Quinones
Info: My models and association. I got a ServiceUser ( Manager ) model,User model, ServiceCompany model, Employee model and a Project model. A ServiceCompany can have many projects, employees and m...
11
posts

Idea for TimeClock Need Advice
General • Asked by shakycode
I'm wanting to integrate Time Clock functionality into an existing Rails 3.2.21 app. I think I have an idea of how to do this, but I need some advice on the how to handle different scenarios. S...
28
posts

SQL injection attempts, any advice?
General • Asked by Javier Sanz
Hi there, In the logs of Rollbar for my app [petithacks.com](http://petithacks.com), I have seen in the past 2 days attempts like the ones in the image ![SQL injection attempts](http://static....
5
posts

Subscribe to the newsletter

Join 20,000+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.