Ruby on Rails Community Forum

how scrabe data every day

8
General
how can I schedule to gather data with nokogiri and store it(only what has changed) in a db every morning?
Chris Oliver replied

Is there an easy way to display open or closed based on time of day?

1
General
So, I am making an application that is listing multiple businesses. I am wanting to have a label that displays open or closed for each individual business. Could anyone give me guidance on how to m...
Chris Oliver replied

Switch state of boolean field

3
General
Hi, on my index page i want to place a button for each record where i can switch the state from active to inactive or from inactive to active. the button should change without refreshing the page....
Chris Oliver replied

Multitenancy with the Apartment gem Sending email in production

16
General
Hi I did the Multitenancy app works great only problem that im having is on production the app wont send email. On local machine it send it with no problem. Any help and what info that you need le...
Francisco Quinones replied

Ajax Search Remote True across the site

7
General
I'm building an app in Rails 4.2.x and I'm using Ransack + Geocoder for my searches. Originally I setup a Remote: True search using Ajax in my index action and I can search no problem with the res...
shakycode replied

¿How make I to upload multiple images with refile?

2
General
¿How make I to upload multiple images with refile?
Wouter van den Beld replied

Getting data from one Rails app to another

0
General
I'll try to keep this as brief as possible. I have a Rails app which is a static codebase and runs on 9 different servers all the same db schema but of course with different values. I wrote some...
shakycode posted

Handle money in Rails

1
Rails
Hi, What do you think is the best way to handle money in rails? At the moment i use a decimal field with a precision if 16 and a scale of 2. the problem is that we use the comma as a decimal sign...
Chris Oliver replied

Bug in search

1
General
If you search for the word "type", it's causing a 500 error. Just wanted to let you know. Thanks for the site! Jerry
Chris Oliver replied

Why are these partials rendering differently?

8
General
I’m doing a thing where I’m rendering table rows: ``` <%= render partial: "choices_table_row", collection: @images, as: :image %> ``` Then, inside that partial: ``` <%= image.name %&...
Chris Zempel replied

API TOKEN DEVISE

7
Gems / Libraries
Hi, I have a question about which gem is better, devise_token_auth or devise_token_authenticatable?. I see that devise_token_auth was update recently while the other not.
Michael Stitt replied

What happen to the search field for the videos?

3
General
Seems like the site is currently undergoing some changes, but just wondering if we are getting back the search field for the videos anytime soon.
Chris Oliver replied

How can I grow this search object?

6
General
I've got a domain object I use to search images by whatever tags it has/the year the item in the image was made. It's worked flawlessly in a couple places: ```ruby class SearchImage def initial...
Chris Oliver replied

How to compare and write conditions on active record field "time"

1
General
```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 results as you...
Chris Oliver replied

Page Specific Javascript

4
Javascript
I just came across this article that talks about a gem that allows you to implement cleanly space specific javascript. http://brandonhilkert.com/blog/page-specific-javascript-in-rails/ However, i...
Greg Cosgrove replied

Clarification needed for simple_calendar sort_by method

2
General
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?(:simple_...
sid d replied

jQuery and Turbolinks not playing nicely

0
General
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 I...
shakycode posted

Admin for the specific case

2
Gems / Libraries
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 attribu...
djyanee replied

Ransack undefined method path in Rails 4.2.1

1
General
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: `...
shakycode replied

Ransack undefined method _path in Rails 4.2.1

0
General
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: `...
shakycode posted

Learning Ruby on Rails? Join our newsletter.

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