-1
votes
0answers
11 views

Guzzle in Ruby or Rails?

Guzzle is a PHP HTTP client framework with caching, plug-ins, logging, etc. http://guzzlephp.org/ Is there an equivalent for Ruby or for Rails?
0
votes
1answer
11 views

How do I query by an attribute when that attribute is an array and I'm looking for a certain value within that array

I have a User model, and a user has many seniors. I want to return all user records who's senior_ids column contains id= x. The best I could come up with was User.where("? IN senior_ids", x), but that ...
0
votes
1answer
8 views

List of items to have a random selection and then be inserted to css - not working

I am trying to have a list of items be randomly selected and then inserted to the CSS in the view. Essentially, I want a list of steps in which the icon selected is random. I tried putting a list of ...
0
votes
0answers
13 views

Ruby rails: is there a gem to rebuild database index?

I'm currently using Apache derby database. Part of the recommendation is to continually rebuild the index (eg drop and add index) for better performance. Does anyone know if there is a gem that will ...
0
votes
2answers
38 views

Slicing array in Ruby

for slicing an array, we can use 2.0.0p247 :021 > arr = [1,2,3,4,5] => [1, 2, 3, 4, 5] 2.0.0p247 :022 > arr.each_slice(3).to_a => [[1, 2, 3], [4, 5]] 2.0.0p247 :034 > arr # does ...
0
votes
1answer
25 views

Rails - undefined method `api_key' for nil:NilClass

Im trying to store my api key in a yaml file fresh_desk.yml production: :api_key: 12345 staging: :api_key: 12345 development: :api_key: my api key here then in my lib folder i have a file ...
0
votes
1answer
19 views

How to properly call a helper method or js.rjs file from JQuery? [Rails 2.3.11]

Currently when I click a button a dialog pops up http://jsfiddle.net/RBKaZ/ . The view of interest with is an html.erb is shown below <div style="text-align: left;"> <div id="dialog"> ...
0
votes
1answer
15 views

Cannot access local method variable in pry

I have the following method: def update loan = Loan.find(params[:id]) pry respond_with loan.update(loan_params) end So I would expect that when I get to pry in the console I should ...
0
votes
1answer
23 views

When doing an update_attributes on my user model with Devise my user gets logged out

When I attempt to do an @user.update_attributes(params[:user]) my user is logged out, or what appears to be logged out. I get the message, undefined method 'first_name' for nil:NilClass. If I go back ...
0
votes
3answers
29 views

basic counter to increment a link is not displaying properly in my view

I have a number of steps and I have a counter that I would like to increment as the block iterates through the steps. More specifically, if its media type is "excel" or anything else I would like it ...
0
votes
0answers
8 views

Twitter Access Token URL returns Invalid Request Token

In my controller I have the following actions def twitter client = TwitterOAuth::Client.new( :consumer_key => ENV['TWITTER_KEY'], :consumer_secret => ENV['TWITTER_SECRET'] ...
0
votes
0answers
14 views

Finding out if User has logged out of Gmail/Google (with or without Google API)

I currently sign in a user on my website through the Google API (on ruby, using https://github.com/zquestz/omniauth-google-oauth2). I would like to know if there is a way for my application to find ...
-1
votes
0answers
28 views

Rails Heroku “Page doesn't exist”

Please help. When I run this on a rails server it shows up in the browser. But when I use Heroku to open, the browser reads "This page doesn't exist". I can't figure out the problem. Also, I'm new to ...
0
votes
1answer
33 views

“Could not find table 'microposts'” issue with Michael Hartl Tutorial Chapter 10

I'm trying to create a micropost model in chapter 10 of michael hartl's tutorial and I cannot get past the rspec tests. Here's what I've done: rails generate model Micropost content:string ...
0
votes
0answers
15 views

Make acts_as_paranoid finders exclude “deleted” objects conditionally

Normally, with acts_as_paranoid, when you use a finder such as find or where, it excludes entries that have a deleted_at (or whatever you named your delete column) value other than null. However, I ...

1 2 3 4 5 2265
15 30 50 per page