Ruby on Rails Community Forum

How do I use pushstate to create infinite scrolling blog effect in a standard rails app?

2
General
How do I use pushstate in a simple rails blog to create the effect that larger new sites are currently using: as you scroll to the bottom of the page, the next article seamlessly is loaded, the url...
Thomas Bush replied

Non-rails, block ip address from nginx without logging to error.log?

4
Servers
Posted this to serverfault too, but I'm still stuck: I have a server that keeps trying to brute force hack via xml-rpc post on a wordpress site (I know, I know). I've blocked the ip address in ng...
Brian Schwartz replied

How would you improve these db's and associations

2
Databases
Database Structure Hello people. I have my first proper paid Rails project to start soon, so I’ve been thinking about the database and the associations. The two links below are the databases and...
Shaun Fahey replied

How to generate PDF based on search using prawn in ruby on rails

1
Gems / Libraries
So Chris im using prawn pdf in my app. Now im adding some search form to filter by date range. All works fine and I get my filter table on my index. my problem is with prawn that wont hold the fil...
Francisco Quinones replied

Single sign in Devise STI

0
Gems / Libraries
Hey there I have an STI on devise model which is working but there is an issue with how to manage what menus to show when different types of users are logged in here is my code user.rb c...
JM posted

CSV Import

3
Ruby
My question is about this Episode: https://gorails.com/episodes/upload-csv-form The CSV Import works fine (I'm using the exact same code actually). My 1. Question - How can I define an alias for ...
Chris Oliver replied

Style a drop down menu with css

3
CSS
I watched the tuto on making notifications but i can't set the css to display the notifs properly. Could someone show me an exemple of his css ? Thanks
Chris Oliver replied

Paperclip - Watermarking for dynamic image sizes

0
Gems / Libraries
I'm looking to add watermarks to all images that are uploaded to my application. They can be of several sizes and this is where I'm running into trouble. This is my watermark processor: modul...
Michael Victor posted

Devise models and Single table inheritance and custom class methods

4
Gems / Libraries
Hello there I am in a little fix and cant figure out whats going in, i am attempting to have a devise model User share via STI with 2 other sub-classes . I am able to populate both classes with dat...
JM replied

Use datatables like handsontable

1
General
Hi, I would love to see a episode that explains the use of json/ajax and load and save back data back to the server. For example i want to use handsontable (http://handsontable.com/) but i cant lo...
Chris Oliver replied

2 Factor Authentication

5
Gems / Libraries
Hey Chris. This would be good for a screencast, well i'd like to see it for sure! https://github.com/tinfoil/devise-two-factor
Chris Oliver replied

How do I hold Braintree payments for longer than the given escrow duration?

4
General
I want to create a payment system using Braintree that will only charge the user once a certain condition is met. Lets assume its like freelancer and we need the payment to only go through when the...
Tharan Raj replied

How do i collect the users emails into mandrill ?

2
Gems / Libraries
I have watched the mandrill tutorial. I just have a quick question. How can i link the list on mandrill or any email service with the users emails (when the user signs up ) and update the list wh...
Ahmed Althani replied

I need help setting up Acts_as_Follower Gem

1
General
The documentation for this gem is very shotty, and I can barely understand If you can help me setup the methods for the controller, views, toggle on and off follow button, and blocking users. That...
Chris Oliver replied

Pre-populate association for nested form

2
General
Hi so here is what i have : class Attendance < ActiveRecord::Base belongs_to :attendance_sheet belongs_to :user end class AttendanceSheet < ActiveRecord::Base ...
JM replied

Issues with JQuery AtWho

5
Javascript
Hello, I enjoyed your screencast on implementing the @ functionality for user interactions. What I'm trying to figure out is how to handle the index.json.jbuilder when using devise jQuery -> ...
Lee Terng Gio replied

Simple Form - Make label appear after input

2
Gems / Libraries
I have a simple form tag as given below: = f.input :email, required: true, input_html: {class: 'md-input'}, wrapper_html: {class: 'md-form-group float-lable'} and it generates the below HTML ...
Michael Victor replied

Performing calculations using scopes

10
General
hello , hopefully this isn’t too ambitious but i am hoping there is a way to do simple summation using defined scopes example is i have these scopes : scope :present, -> { where(prese...
Chris Oliver replied

Basics commands for using MacVim

1
General
Hey Chris, Your videos are awesome. I think it would nice to have some of the basic commands for using MacVim while coding.
Chris Oliver replied

Advanced Ransack Usage

0
General
Hi all, I've got the following question on StackOverflow: http://stackoverflow.com/questions/34259808/custom-ransacker-on-dynamically-generated-association Wondering if anyone here might have any...
Bryce Roney posted

Learning Ruby on Rails? Join our newsletter.

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