[Rails] How can I improve my "reviewname" method

2015-06-03 Thread Jay Lemar
Hey guys, I am a student and I got the memo (without explanation) that my following code can be much better. How would you improve my controller/reviewname method? Thank you for your time! class ReviewController < ApplicationController def index @reviews = Review.all.order(created_at: :desc)

[Rails] Can not find file sqlite3_native.so

2014-10-08 Thread Jay Schrock
Trying to run the tutorial locally after downloading it from the cloud9 (just started, updated the gem file, that's it)... Ran bundle install (errored on byebug which I since commented out) then the bundle install worked.. Tried rails server, and it errored out with the following error. C:/Ruby2

[Rails] Re: Embarrassingly Simple Question

2014-07-06 Thread Jay Garnett
This issue has been resolved. I have spent a fair amount of time learning about the different versions of Rails including changing from one to another. During this process, a new version of Rails became available, 4.1.4. Out of curiosity, I tried my code with the newer version and the pages

Re: [Rails] Embarrassingly Simple Question

2014-07-06 Thread Jay Garnett
Thanks Scott. I am currently using rbenv. On Saturday, July 5, 2014 5:17:30 PM UTC-5, Scott Ribe wrote: > > On Jul 5, 2014, at 4:00 PM, Jay Garnett > > wrote: > > > I agree and am in the middle of learning how to downgrade Rails. :) > > You might want to use RVM,

Re: [Rails] Embarrassingly Simple Question

2014-07-05 Thread Jay Garnett
I agree and am in the middle of learning how to downgrade Rails. :) Thanks again everyone!! On Saturday, July 5, 2014 2:41:11 PM UTC-5, Colin Law wrote: > > On 5 July 2014 19:57, Jay Garnett > > wrote: > > Done. No effect. As I mentioned, I don't think it's a rou

Re: [Rails] Embarrassingly Simple Question

2014-07-05 Thread Jay Garnett
frustrating that I can't get this to work the way it should... Thanks for the lessons. On Saturday, July 5, 2014 1:56:19 PM UTC-5, Hassan Schroeder wrote: > > On Sat, Jul 5, 2014 at 11:46 AM, Jay Garnett > wrote: > > > But I don't think routing is the problem. The rendered l

Re: [Rails] Embarrassingly Simple Question

2014-07-05 Thread Jay Garnett
ay, July 5, 2014 1:49:44 PM UTC-5, Walter Lee Davis wrote: > > > On Jul 5, 2014, at 2:46 PM, Jay Garnett wrote: > > > Here is my current routes.db: > > > > Rails.application.routes.draw do > > > > root "demo#index" > > match ':con

Re: [Rails] Embarrassingly Simple Question

2014-07-05 Thread Jay Garnett
the first place. When the user clicks on the link, they are being routed correctly but the link isn't pointing where it was intended to point. On Saturday, July 5, 2014 1:25:27 PM UTC-5, Colin Law wrote: > > On 5 July 2014 16:00, Jay Garnett > > wrote: > > Thanks Walter

Re: [Rails] Embarrassingly Simple Question

2014-07-05 Thread Jay Garnett
Thank you for your kind comments. At first blush, I thought the problem was something simple like a setting or something a new user wouldn't automatically know, but would be obvious to ROR pros. The bottom line is my code is supposed to be linking the user to the hello.html page, but it doesn'

[Rails] Re: Embarrassingly Simple Question

2014-07-05 Thread Jay Garnett
Thanks, Colin. Yes, I copied and pasted my code. And I do understand what you're saying. :) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-

[Rails] Re: Embarrassingly Simple Question

2014-07-05 Thread Jay Garnett
Colin- I'm not sure I understand your question 100%. I posted both the template code and the html code that was being rendered. In addition, I posted the Controller code. I did not, however, post the entire template code, but the code that was left out shouldn't be relevant. Here it is: De

Re: [Rails] Embarrassingly Simple Question

2014-07-05 Thread Jay Garnett
Here it is: Rails.application.routes.draw do root "demo#index" #get 'demo/index' match ':controller(/:action(:id))', :via => :get end Thanks in advance for your help! On Saturday, July 5, 2014 7:34:50 AM UTC-5, Walter Lee Davis wrote: > > > On Jul 5, 2014, at 2:45 AM, Ja

[Rails] Embarrassingly Simple Question

2014-07-05 Thread Jay Garnett
I'm the ultimate newb on ROR. I am following through a tutorial on Lynda.com called "Ruby on Rails 4 Essential Training". I am learning about the MVC structure. They show a web page that has the following links: Hello page 1 <%= link_to('Hello page 2', {:action => 'hello'}) %> According to

[Rails] Re: Remove Http header response

2014-06-25 Thread Jay Dee
Here's the syntax of the response: http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving e

[Rails] Re: Remove Http header response

2014-06-25 Thread Jay Dee
Colin, Yes, it does say that, however, the "or" is important as it also says that the transfer encoding may be removed. The OP wants to send a response without any headers. This is within the rfc and so should be doable, regardless of how retarded it seems to be :) -- Posted via http://www.rub

[Rails] Re: Remove Http header response

2014-06-24 Thread Jay Dee
You may think it is nonsense, W3 think otherwise. Perhaps you should inform them of their nonsense? http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4 "message consist of a start-line, *zero* or more header fields" -- Posted via http://www.ruby-forum.com/. -- You received this message

Re: [Rails] startup script

2014-02-28 Thread Jay Amorin
Now I get it. Thanks guys for pointing me to the right direction. Jay On Fri, Feb 28, 2014 at 7:31 PM, Frederick Cheung < frederick.che...@gmail.com> wrote: > On Friday, February 28, 2014 4:33:05 AM UTC, Jay Amorin wrote: > >> I just want that every time i restart my server

Re: [Rails] startup script

2014-02-27 Thread Jay Amorin
ith a startup/init script. I hope that someone already did that and would like to share. Jay On Fri, Feb 28, 2014 at 1:26 AM, Colin Law wrote: > On 27 February 2014 15:52, Jay Amorin wrote: > > Hi, > > > > I just started ruby on rails. Would it be possible to create a sta

[Rails] startup script

2014-02-27 Thread Jay Amorin
Hi, I just started ruby on rails. Would it be possible to create a start script that I can use on boot? /etc/init.d/my_rails_init_script.sh {start|stop} I've search the web and I can't find any. Thanks, Jay -- You received this message because you are subscribed to the Google Gr

[Rails] Issue with Deploying a Rails app on VPS - cannot load such file -- unicorn/launcher

2013-10-16 Thread Jay De Leon
I am trying to deploy a rails application to a digitalocean VPS droplet. I have the following setup Ruby on Rails on Ubuntu 12.10 (Nginx + Unicorn). I have installed Ruby ruby-2.0.0-p247 and rails Rails 4.0.0 via rvm but when I try to restart Unicorn I get the following error. /usr/local/rvm/r

[Rails] rails_csi gem vs rails

2013-08-27 Thread Jay Boyer
ional functionality comes with the rails_csi gem? thanks in advance, Jay -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@g

[Rails] Re: pro bono rails help for my non-profit

2013-07-03 Thread Jay Zheng
what's your contact? On Monday, July 1, 2013 2:13:19 AM UTC-7, Neeraj Kapoor wrote: > > Hello! > > My name is Neeraj Kapoor and I'm writing on behalf of the Learn To Be > Foundation, a 501(c)3 non-profit organization dedicated to providing free, > one-on-one, online tutoring to K-8 students in

[Rails] using partials

2013-03-30 Thread Jay notReq
On the left hand side of my page there is a list of documents that the user has already created. And a form to create/edit documents. | list of documents| Edit/Create documents| ||| ||

[Rails] Re: Rails CMS best fit

2012-10-22 Thread Jay Damodaran
Functionality wise, I've had really easy time integrating these CMS libraries. https://www.filepicker.io/products/libraries/ Let's you grab content through urls. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on R

[Rails] Awesome libraries

2012-10-09 Thread Jay Damodaran
Hey guys, Filepicker just released some of their rails libraries for user content handling. https://github.com/Filepicker/filepicker-rails Definitely worth checking out. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ru

[Rails] Figured out. Thank you all for the posts

2011-12-23 Thread Jay Chaun
Thanks to Colin Law, Timothy G., Stephan Wehner, Greg Akins, Gautam Pai. Here is what I got. 1. Ajax is a bad idea for this. It will waste bandwidth and more importantly makes the character counting unreliable. You do not know when the response will be. 2. Javascript is supposed to be the tool

[Rails] Re: How to fire Ajax call from Form_for

2011-12-17 Thread Jay Chaun
. How can I use unobtrusive one to do this. Any help with pointing to the right direction would be greatly appreciated. Colin Law wrote in post #1037179: > On 17 December 2011 20:06, Jay Chaun wrote: >> I am learning Rails 3 and need some help on Ajax part. >> >> I am try

[Rails] How to fire Ajax call from Form_for

2011-12-17 Thread Jay Chaun
I am learning Rails 3 and need some help on Ajax part. I am trying to accomplish the following: There is a textarea on the page which has a length of letters constraint, say 100. Every time a symbol is typed there,a nearby label tells you how many letters you have left. I plan to use Ajax to do t

[Rails] Code in friendship or user controller?

2011-12-17 Thread Jay Dizzle
Hi All, I have an existing users/index view that displays all the users registered by the app. I want to modify it such that it also displays friends (existing and invited). However, the code used to pull friendship data front the db is located in the friendships controller. I can add:

[Rails] jay parteek wants to chat

2011-12-05 Thread jay parteek
--- jay parteek wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-3329dde891-e486dd7141-Avqz-hKfljqmyqmJz8VEP3lmPKM Y

Re: [Rails] jquery - word is not defined

2011-12-05 Thread jay parteek
You may not have property path to jquery/ .js file. Get Firebug in firefox, to remove the error. On Mon, Dec 5, 2011 at 2:08 PM, Jason Fleetwood-Boldt wrote: > > On Dec 5, 2011, at 5:04 PM, Jason Fleetwood-Boldt wrote: > > > So... it's a little hard to follow you're debugging steps, are you >

[Rails] Graceful degradation/progressive enhancement for ActionMailer templates?

2011-11-29 Thread Jay Levitt
Is there some gem or technique that will let us write only .html.erb templates for our Rails 3 mailers, and gracefully degrade them by stripping HTML tags for the text/plain version, rather than having to create each partial twice? Google is seriously failing me, so I must be searching for the wro

[Rails] Re: Can't upgrade Rails - Failed to build gem native extension.

2011-09-06 Thread jay@oz
a try, but to be honest, this is all starting to remind me of the bad old days of .jsp.. Thanks again Jeffrey.. On Sep 6, 1:22 am, "Jeffrey L. Taylor" wrote: > Quoting jay@oz : > > > > > > > > > > > I am new to Rails and attempting to upgrade Rails

[Rails] Can't upgrade Rails - Failed to build gem native extension.

2011-09-05 Thread jay@oz
I am new to Rails and attempting to upgrade Rails on my Mac to latest version so that I can follow the rails tutorial, but I just can't seem to get anywhere. When I attempt to update rails with: $ sudo gem update rails -y, I receive the following error. ERROR: Error installing rails: ERROR

[Rails] Re: Trying to upgrade a rails app from 2.3.2 to 2.3.11

2011-06-30 Thread Jay
thanks man! I'm going to try that right now... that makes a bunch of sense. I appreciate you taking the time to respond. On Jun 29, 11:50 pm, Chirag Singhal wrote: > Rename your template from new.rjs.js to new.js.rjs and it should work -- You received this message because you are subscribed to

[Rails] Trying to upgrade a rails app from 2.3.2 to 2.3.11

2011-06-29 Thread Jay
pgrade rails. Has anyone seen anything like this? I've been trying to read all the upgrade notes I can get my hands on. I guess I'm looking for ideas, pointers, suggestions, anything... Thanks! Jay -- You received this message because you are subscribed to the Google Groups "

[Rails] Unable to Connect

2011-05-06 Thread Jay
I could give that would be helpful? Thanks a ton, Jay -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonra

Re: [Rails] Senior Ruby on Rails Developer with Front End Skills

2011-04-29 Thread Jay Sonmez
loper They may also consider candidates with no ExtJS experience as they are looking for 2: http://jobtracky.com/senior-ruby-on-rails-developer Look forward to talking to the folks who are interested in. Jay Sonmez Technical IT Recruiter Concepts In Staffing 9 East 37th Street | New York, NY

[Rails] Senior Ruby on Rails Developer with Front End Skills

2011-04-29 Thread Jay Sonmez
Position Description A software company is looking for an experienced software engineer with significant software development experience in Ruby on Rails and ExtJS as well as other Open Source technologies and Agile development methodologies. What you'll do: Build on the core of a web based ente

Re: [Rails] Required Ruby on Rails Developer ( Front End/ Back End ) / Boston, MA ( Immediate Interview )

2011-02-04 Thread jay gallivan
Greetings: Thanks for contacting me. What is the rate on the project? What is the business domain? Regards, Jay. On Wed, Feb 2, 2011 at 11:06 AM, Chandan Kumar wrote: > Dear Partner, > > > > Please find our Urgent Direct Client Requirement and send me some matching > profi

Re: [Rails] Immediate Interview - Backend / Front End Software Engineer with Ruby on Rails (6 Position) - Boston, MA

2011-01-14 Thread jay gallivan
This does not answer my question. On Fri, Jan 14, 2011 at 1:22 PM, Chandan Kumar wrote: > *Hi Partner, * > > * * > > *Please have a look on the Direct Client Requirement and send me your > updated resume ASAP. * > > * * > > *Position:** Backend Software Engineer with Ruby on Rails * > > * * > >

[Rails] Re: Do associations work both ways?

2010-12-12 Thread Ast Jay
Thanks again Rodrigo, and no worries about your English... it is very good! If you're on twitter, please feel free to add me :) my username is: AstonJ -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

[Rails] Re: Do associations work both ways?

2010-12-12 Thread Ast Jay
Thanks Rodrigo. Is that only for db fields that are part of the 'join'/association? Because I had some other fields that were empty too (but they belonged to the post model) but they didn't cause any probs. -- Posted via http://www.ruby-forum.com/. -- You received this message because you ar

[Rails] Re: Do associations work both ways?

2010-12-12 Thread Ast Jay
Thank you both for your help - I got it fixed with a little help from Isaackearse on the Rails IRC channel. The reason it was playing up was because I had some posts in the db that weren't associated to any users - once they were deleted everything works as expected :) Thanks again to everyone

[Rails] Re: Do associations work both ways?

2010-12-12 Thread Ast Jay
Hi Rodrigo, thanks for the reply. I've tried that - but still doesn't work :( I pushed the app to git: https://github.com/Brook/uf/blob/master/app/views/topics/index.html.erb And you can see where I'm trying to call it on line 18 Maybe you can spot where I've gone wrong? :/ -- Posted via htt

[Rails] Re: Do associations work both ways?

2010-12-12 Thread Ast Jay
Hi Fred, thanks for the reply. In the rails console with 'post.user' I get: NoMethodError: undefined method `user' for # And in my view 'post.user.nameI get: undefined method `name' for nil:NilClass If I leave off '.name' I get what looks like an object: -- Posted via http://www.ruby-forum

[Rails] Do associations work both ways?

2010-12-12 Thread Ast Jay
This may seem like a real simple question, but do associations work both ways? I have a user model with, has_many :posts I have a post model with, belongs_to :user My posts controller has @posts = Post.all and my view does a '@posts.each do |post|' loop In that loop, can I do: <% post.user %>

[Rails] Best way to get a trending/popular list?

2010-12-05 Thread Ast Jay
I want to create a field called "What's on your mind?" where users can add a short sentence - and wondered if it would be possible to create a list of what's popular. Maybe I could put the sentence into an array, remove common words like 'the', 'it', 'you', etc and then use the remainder of the wo

[Rails] Rails and JQuery and Ajax/Json question

2010-11-06 Thread Jay McGaffigan
a number of ways I can work around this (using jQuery.ajax, not using ajaxSetup ...) But I was wondering if there is a convention that folks have adopted in cases like this? Thanks! Jay -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk

[Rails] File upload conversion

2010-09-23 Thread Jay McGaffigan
on a shared host) where we don't have open office in headless mode available. I've been googling around and can't seem to find anything so I am kind of assuming my configuration doesn't support what I need my rails app to do but I thought I'd take a shot and see if a

[Rails] Link directory in Rails - easy?

2010-04-20 Thread Ast Jay
Hey All, hope someone can give me an idea of how easy/difficult it would be to to create a link directory in Rails. Here's a brief spec: - People should be able to create an account and submit a link, either to a category or just tag it with some keywords. - There should be an option to allow pe

[Rails] Re: Re: Can I access another apps mysql database with my rails app?

2010-04-20 Thread Ast Jay
Philip Hallstrom wrote: > On Apr 20, 2010, at 1:16 PM, Ast Jay wrote: > >>> >> Would you know if it is easy enough to share sessions with a forum app >> such as vbulletin? > > Unlikely to be easy. But if the cookies are available and you're > will

[Rails] Re: Can I access another apps mysql database with my rails app?

2010-04-20 Thread Ast Jay
Philip Hallstrom wrote: >> mysql database directly? >> >> Guess I would just need to give it username/pw for the db, and the >> mysql >> query? >> >> Is it going to be easy enough to do, or should I stick with a full php >> solution (can't drop PHP as we need a full featured forum like vB). > >

[Rails] Can I access another apps mysql database with my rails app?

2010-04-20 Thread Ast Jay
Sorry if the answer is obvious (nube alert) but would it be possible for me to access the DB of a php app using a mysql database, from within my Rails app? I want to install my (php) forums in forum.site.com, and my main site (using rails) will be at the root, site.com - so could I list the latest

[Rails] Re: rubyzip not recognized in rails

2010-03-24 Thread Jay
Furthermore, I have tried to add ENV['GEM_PATH'] = '/usr/local/lib/ruby19/gems/1.9' at the beginning of the environment.rb but still failed. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrai

[Rails] Re: rubyzip not recognized in rails

2010-03-24 Thread Jay
lled is not recognized at all. :' ( On Mar 24, 4:12 pm, Gintautas Šimkus wrote: > There is a typo in initilizer. Also require 'rubygems` in your code before > requiring zip/zip > > 2010/3/24 Jay > > > > > First of all, Let me list my configurations: > > >  F

[Rails] rubyzip not recognized in rails

2010-03-24 Thread Jay
First of all, Let me list my configurations: FreeBSD 8.0 Ruby 1.9.1p376 Rails 2.3.5 rubyzip 0.9.4 installed in /usr/local/lib/ruby19/gems/1.9/gems/ rubyzip-0.9.4 I have placed the following line inside Rails::Initializer.run block cconfig.gem 'rubyzip', :lib => 'zip/zip' However, I go

[Rails] Re: Modelling question

2010-03-08 Thread Jay P
Look up has_many and belongs_to On Mar 8, 4:03 pm, Greg Ma wrote: > Hi, > > I have these 3 models: > City :name > Product :name > city_preference :city_id, :product_id, :min, :max > > How do i create the associations between these tables? > Best > Greg > -- > Posted viahttp://www.ruby-forum.com/.

[Rails] Re: validation and STI

2010-03-08 Thread Jay P
What version of rails are you using? I just read "This seems to be a regression issue on Rails 2.3, works fine on previous rails versions" On Mar 8, 4:10 pm, eugenio wrote: > i got a problem with validation and sti class > > Account < ActiveRecord::Base >   validates_uniqueness_of :field1 >   ..

[Rails] Re: " appearing in email

2010-02-05 Thread Jay Dev
Frederick Cheung wrote: > On Feb 4, 9:11�pm, Philip Hallstrom wrote: > >> > <%=h @notification.message %> >> >> Don't escape it. �h is an alias for html_escape which (for 2.3.2) does � >> this on the argument: > > > To be quite precise, only use h (that is, html_escape) if the output > is html.

[Rails] " appearing in email

2010-02-04 Thread Jay Dev
I am having problems with the formatting of my email. This is what my code looks like - email = NotifyMailer.create_send_notifications(@notification,@test) email.set_content_type("text/plain") NotifyMailer.deliver(email) --- and my send_notifications.rhtml looks like thi

Re: [Rails] Re: how to manage the caching of the results of long running queries

2009-12-03 Thread jay gallivan
This sounds like fragment caching rather than page caching. Is that right? On Wed, Dec 2, 2009 at 10:11 PM, David wrote: > Depends on how many queries they are and how long they take > individually. If it's one query that takes 30 seconds, then look at > breaking it up or optimizing it. If it's

[Rails] Using observe_field on an field inside a fields_for

2009-08-17 Thread Jay
I'm trying to observe a field that get generated inside a fields_for loop (I'm trying to create the form dynamically depending on a selection value). Is there a way to access the index in the field_for loop? Thanks, Jay --~--~-~--~~~---~--~~ You rec

[Rails] Yahoo OAuth Ruby + Yahoo Social API

2009-08-06 Thread jay
I was just wondering if anyone has worked with Yahoo OAuth or the Yahoo Social API. They seem to have a pretty thorough and simple PHP library, but has anyone attempted a RoR implementation? I'm basically looking for some sample code on how to authenticate using Yahoo OAuth and then getting the

[Rails] Re: Retrieving count of individual items among the table

2009-06-06 Thread Jay Covington
Frederick Cheung wrote: > On Jun 6, 5:05�pm, Jay Covington > wrote: >> >> @statcount = table.count(:all, :conditions => statcount_query).to_s >> ("grocery") that �contains: "title", "item1", "item2", "item3", "

[Rails] Re: Retrieving count of individual items among the table

2009-06-06 Thread Jay Covington
Frederick Cheung wrote: > On Jun 6, 3:59�pm, Jay Covington > wrote: >> >> Still no luck. Is there a way to reference <%= table.item1 %> where >> BLANK is in the following code?: >> >> item_ids = 1..5 >> � � statcount_query = i

[Rails] Re: Retrieving count of individual items among the table

2009-06-06 Thread Jay Covington
Jay Covington wrote: > Marnen Laibow-Koser wrote: >> Jay Covington wrote: >> [...] >>> item_ids = 1..5 >>> statcount_query = item_ids.map{|id| "item#{id} = BLANK "}.join(" OR >>> ") >>> @statcount = table.count(:all,

[Rails] Re: Retrieving count of individual items among the table

2009-06-06 Thread Jay Covington
Marnen Laibow-Koser wrote: > Jay Covington wrote: > [...] >> item_ids = 1..5 >> statcount_query = item_ids.map{|id| "item#{id} = BLANK "}.join(" OR >> ") >> @statcount = table.count(:all, :conditions => statcount_query).to_s > >

[Rails] Retrieving count of individual items among the table

2009-06-04 Thread Jay Covington
I have a table that is displaying a list of 5 items. Next to each item I want to display the number of times that the item pops up in an individual list. Example: Item1 (4) Item2 (2) Item3 (1) Item4 (7) Item5 (3) Here is my code as is: Index.rhtml.erb <%= table.item1 + '' + @statcount %> <%=

[Rails] Re: Conditions for Multiple Columns?

2009-06-02 Thread Jay Covington
Jeff Schwab wrote: > Jay Covington wrote: >> :item1 fields, but I need to retrieve the count for "Apple" from the >> columns :item2, :item3, and :item4 as well as :item1. Any ideas? Thanks! > > item_ids = 1..4 > apple_query = item_ids.map {|id| "item#{id}

[Rails] Conditions for Multiple Columns?

2009-06-01 Thread Jay Covington
Hello, I have a table called "Itemlist" and have multiple columns in it such as "item1", "item2", "item3", "item4". These columns often have repetitious data between them and I'm trying to count it. The only working code I have so far is: statcount = Itemlist.count(:all, :condition => {:item1 =>

[Rails] Re: Can't get around this Routing Error

2009-06-01 Thread Jay Covington
Frederick Cheung wrote: > On May 31, 10:45�pm, Jay Covington > wrote: >> (127.0.0.1:3000/user, >> >> I receive the error below: >> >> --- >> -- >> ActionController::RoutingE

[Rails] Can't get around this Routing Error

2009-05-31 Thread Jay Covington
Hi All, I'm currently stuck trying to get a scaffold routed correctly. The line of code causing me problems is: (link_to 'Edit', edit_listhub_path(@listhub)) It works fine in 127.0.0.1:3000/listhubs. However, when I try it in a partial in the "user" controller (127.0.0.1:3000/user, I receive

[Rails] Re: autocomplete fill in text fields

2009-05-29 Thread jay
When the autocomplete value is selected do an ajax call to your application returning the data you need to fill in using a format you can parse in JavaScript like JSON and set the form values. On May 29, 12:36 am, Me wrote: > If you have an autocomplete and you have several text fields that hav

[Rails] Re: Scaffolding Results Format

2009-05-28 Thread Jay Covington
Ar Chron wrote: > Take a look at the in_groups_of method for your list processing in the > view... > > @books.in_groups_of(3) do |group| > start row > group.each.do |book| > start column > book.title + '' + book.abstract > end column > end > end row > end > > or something li

[Rails] Re: Scaffolding Results Format

2009-05-27 Thread Jay Covington
Conrad Taylor wrote: > On Wed, May 27, 2009 at 4:16 AM, Jay Covington < > rails-mailing-l...@andreas-s.net> wrote: > >> Default view (127.0.0.1:3000/books) >> >> >> Book One Book Two Book Three >>

[Rails] Scaffolding Results Format

2009-05-27 Thread Jay Covington
Hi Everyone, I built a scaffold and I'm having trouble getting results properly formatted. (I need to get the data into multiple columns instead of just one big column) I can't get all of my CSS to work properly in scaffold.css, layout/books.rhtml, or the books/index.rhtml.erb Anyways, maybe you

[Rails] alias_method_chain :process

2009-05-26 Thread Jay
for any thoughts / suggestions that could send me down a path too look into. Jay --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t

[Rails] Re: change link color on mouse over

2009-04-26 Thread Jay Pangmi
gt; doesnt override this property. > > Thank u > > On Apr 26, 5:01�pm, Jay Pangmi Thanks for the reply Samiron, I figured it out. Use of background: none; did the job but the one you said didn't help. Anyway, I finally had the ugly thing out of my page. Thanks.

[Rails] Re: change link color on mouse over

2009-04-26 Thread Jay Pangmi
Frederick Cheung wrote: > On Apr 26, 7:01�am, Jay Pangmi > wrote: >> Hassan Schroeder wrote: >> > On Sat, Apr 25, 2009 at 7:00 AM, Jay Pangmi >> > wrote: >> > >> === >&g

[Rails] Re: change link color on mouse over

2009-04-25 Thread Jay Pangmi
Hassan Schroeder wrote: > On Sat, Apr 25, 2009 at 7:00 AM, Jay Pangmi > wrote: > >> How can I change the color of the link as the >> mouse is rolled over it? Also, change the color of the active link and >> visited link > > <http://www.w3.org/TR/CSS21

[Rails] change link color on mouse over

2009-04-25 Thread Jay Pangmi
Hi, I googled around for more than 5 hours now but still I couldn't get the solution for my question: How can I change the color of the link as the mouse is rolled over it? Also, change the color of the active link and visited link as I completely hate the default behavior of onmouseover which cre

[Rails] Re: question about creating a link to download

2009-03-25 Thread Jay Dev
This is an example. I tried this below code but it blocks mongrel until the whole file is read which is over 500 MB. def download send_data(open('http://mirrors.gigenet.com/ubuntu/intrepid/ubuntu-8.10-desktop-i386.iso').read, :filename => 'ubuntu-8.10-desktop-i386.iso' , :type =>

[Rails] Re: question about creating a link to download

2009-03-25 Thread Jay Dev
Thanks for the reply. The exe file is on another server. Thanks! Frederick Cheung wrote: > On Mar 25, 6:54�pm, Jay Dev wrote: >> Hi Folks, >> >> I'm new to Rails and working on a project where after the user logs in >> they can click on a link to download a

[Rails] question about creating a link to download

2009-03-25 Thread Jay Dev
Hi Folks, I'm new to Rails and working on a project where after the user logs in they can click on a link to download an exe file ( say for example the file is at http://test.com/test.exe). I want to keep the link to the exe file hidden. What are the best ways to implement this step. I was think

[Rails] Rails 2.3 deleting sessions

2009-03-19 Thread Jay
The following line no longer works in 2.3: ActiveRecord::SessionStore.delete_all ['updated_at < ?', 24.hours.ago] Does anyone know how to do this in 2.3? Thanks, Jay --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[Rails] Re: Issues with database/object caching and testing

2009-03-18 Thread Jay Bo
Ricky Barnaby wrote: > Hi all, > > I just burned two hours of development time trying to debug this issue. > Can someone please tell me if there is a way to disable database caching > when running unit tests or another way to avoid running into this type > of problem?? > > This does not work: >

[Rails] Re: trivial rails model q

2009-03-14 Thread Tom Jay
Michael Graff wrote: thanks - turns out it was irb not reloading classes. i just discovered irb>> load 'measure.rb' will load any changes you have made to 'measure.rb' if you are using irb to poke through your rails thanks again, tom -- Posted via http://www.ruby-forum.com/. --~--~--

[Rails] trivial rails model q

2009-03-14 Thread Tom Jay
hi, new to ruby/rails (where have i been) trying to add a basic static method to a model class... anything besides the normal: def self.method_name(method_args) if method_args == "foo" result = true else result = false end result end which i should know? do i have to do somethi

[Rails] Best way to do model validation and pass errors?

2009-02-28 Thread Jay Bo
Hi all, Following up on the best practices series, what is the best way to do some more advanced model validation, beyond presence, numericality, etc. For example, I want to do some checks on the database to see if a user has performed a certain action before (such as joining a group), and then p

[Rails] Better to pass Activerecord objects or ids as parameters?

2009-02-26 Thread Jay Bo
Hi all, I'm wondering what the best practices/conventions are for passing parameters to models I am writing. Is it better to pass ActiveRecord objects, or their database IDs? In my current application, I've been passing mostly ActiveRecord objects, because I'm generally using some attributes of

[Rails] Re: Fixture hash not available on the console in test env?

2009-02-24 Thread Jay Bo
Tyler Arrigoni wrote: > While the generated id certainly works well for tests, it was previously > easier when loading the test console and interacting with your model > relationships. Is there an expectation to make the fixture hashes > available on the test console? Currently running 2.2.2. I

[Rails] Re: Best practices for develop a web service (server+client)

2009-01-28 Thread Jay Mcgratgh
remotely related ... Can Rails on Ruby work with an established sqlite3 (or mySQL) database? the tutorials I have read so far build the sqlite3 tables with the $ "ruby script/generate model ... " command. I guess what I am trying to figure out is if the Ruby Rails platform will be a wise inve

[Rails] Re: Trying to track down an issue in a performance based load test.. using Rails 2.2.2

2008-12-16 Thread Jay McGaffigan
no... Thank you for responding! It's good just to be able to talk with someone about it. I think I will be putting code into rack... Or rather with JRuby I think if I set it up to have multiple runtimes a mutex is inserted. I'm goign to keep on pluggin :) Jay On Tue, Dec 16, 2008

[Rails] Re: Trying to track down an issue in a performance based load test.. using Rails 2.2.2

2008-12-16 Thread Jay
I think it's more multithreaded... we aren't using JQuery just prototype. Most of the time things work but we are seeing errors where it appears the body just disappears. Jay On Dec 15, 10:31 pm, "s.ross" wrote: > Here's a thought: If it's Ajax and your are

[Rails] Trying to track down an issue in a performance based load test.. using Rails 2.2.2

2008-12-15 Thread Jay
see what happens but this issue is a pretty big issue and we need to resolve it asap. We see it in normal usage of our website too. It appears to be timing related but I'm not sure why or how yet. I'm not necessarily looking for THE answer but any general help of "check xxx" wo

[Rails] Re: Doing Subselect query in Rails... Syntax problem

2008-12-10 Thread Jay Mark
Jay Mark wrote: > Priya Buvan wrote: >> @books = Book.find(:all, :joins=>"books inner join authors as a on >> books.title=a.name", :conditions => ['name LIKE ? ', >> '%'+params[:author][:name]+'%']) >> >> >>

[Rails] Re: wrong number of arguments (0 for 1) error.... Help!!!

2008-12-10 Thread Jay Mark
Frederick Cheung wrote: > On Dec 10, 5:36�am, Jay Mark <[EMAIL PROTECTED]> wrote: >> Rails? >> Is subselect not supported in Rails? >> > > For the sake of argument you can do > > @books = Books.find_by_sql ["SELECT * FROM books WHERE title

[Rails] Re: Doing Subselect query in Rails... Syntax problem

2008-12-10 Thread Jay Mark
Priya Buvan wrote: > @books = Book.find(:all, :joins=>"books inner join authors as a on > books.title=a.name", :conditions => ['name LIKE ? ', > '%'+params[:author][:name]+'%']) > > > try with the above code I put the code in Authors Controller as it is, and I get nil object error. Since I

[Rails] Re: wrong number of arguments (0 for 1) error.... Help!!!

2008-12-09 Thread Jay Mark
Ryan Bigg wrote: > I have no clue. Author.find_by_name should be working when it > (apparently) is not. Something is broken. > - > Ryan Bigg > Freelancer > http://frozenplague.net I think so too. Thanks for your help. Why is it so hard to find the correct syntax for doing a subselect in Rail

  1   2   >