Re: [Rails] How can an rspec test for a view pass if there is no action for the view in the controller?

2012-08-31 Thread Colin Law
On 30 August 2012 22:29, 7stud -- li...@ruby-forum.com wrote: The rspec test looks like this: require 'spec_helper' describe Static pages do describe Home page do it should have the h1 'Sample App' do visit '/static_pages/home' page.should have_selector('h1', :text =

[Rails] Extracting information out of a database column

2012-08-31 Thread Joshua Baldock
Hi All, I'm new to rails and am trying to tackle a problem that I can't seem to find the right solution for. I have an existing database that im building a rails app on top of. One of my columns 'message' is a long string that I would like to be able to query and split into various attributes to

[Rails] Re: Extracting information out of a database column

2012-08-31 Thread Jordon Bedwell
On Friday, 31 August 2012 01:42:10 UTC-5, Ruby-Forum.com User wrote: Hi All, I'm new to rails and am trying to tackle a problem that I can't seem to find the right solution for. I have an existing database that im building a rails app on top of. One of my columns 'message' is a long

[Rails] Re: Paginate an array

2012-08-31 Thread Jordon Bedwell
On Wednesday, 29 August 2012 08:07:18 UTC-5, Ruby-Forum.com User wrote: My controller code is as follows, def index end def show if params[:cat_id] # cat_id is fetched from DB(a table with two columns id and name) #mapped as cat_id in routes file

Re: [Rails] Extracting information out of a database column

2012-08-31 Thread Michael Pavling
On 31 August 2012 07:41, Joshua Baldock li...@ruby-forum.com wrote: I have an existing database that im building a rails app on top of. One of my columns 'message' is a long string that I would like to be able to query and split into various attributes to then be able to display each of those

[Rails] Re: Extracting information out of a database column

2012-08-31 Thread Joshua Baldock
Jordon Bedwell wrote in post #1074013: On Friday, 31 August 2012 01:42:10 UTC-5, Ruby-Forum.com User wrote: I don't quite understand exactly what you mean but it sounds to me like you want a custom serializer.

[Rails] Re: Extracting information out of a database column

2012-08-31 Thread Joshua Baldock
Michael Pavling wrote in post #1074016: On 31 August 2012 07:41, Joshua Baldock li...@ruby-forum.com wrote: I have an existing database that im building a rails app on top of. One of my columns 'message' is a long string that I would like to be able to query and split into various attributes

Re: [Rails] Re: Extracting information out of a database column

2012-08-31 Thread Michael Pavling
On 31 August 2012 08:20, Joshua Baldock li...@ruby-forum.com wrote: Splitting the string and then storing them as additional attributes to the instance variable that contains the rest of the selected table values. Do you have an example of the string; the pattern that similar instances would

[Rails] Re: Re: Extracting information out of a database column

2012-08-31 Thread Joshua Baldock
Michael Pavling wrote in post #1074020: On 31 August 2012 08:20, Joshua Baldock li...@ruby-forum.com wrote: Splitting the string and then storing them as additional attributes to the instance variable that contains the rest of the selected table values. Do you have an example of the string;

Re: [Rails] Re: Re: Extracting information out of a database column

2012-08-31 Thread Michael Pavling
On 31 August 2012 08:59, Joshua Baldock li...@ruby-forum.com wrote: Message column and example message looks like this: The [user] is logged in via [hostname] I assume the square brackets are not in the string, so that a real string might look like : The administrator is logged in via

[Rails] PayPal

2012-08-31 Thread Khan
Hi all i found this link for paypal integration and in the process i got this error undefined local variable or method `pay_bill_url' what does it means Cheers Khan -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

Re: [Rails] PayPal

2012-08-31 Thread sameena Khan
here is the link http://www.funonrails.com/search?q=paypalimageField.x=0imageField.y=0max-results=10 On Fri, Aug 31, 2012 at 4:53 PM, Khan emailtosameenak...@gmail.com wrote: Hi all i found this link for paypal integration and in the process i got this error undefined local variable or

Re: [Rails] PayPal

2012-08-31 Thread Patrick Mulder
The error says that the route is not found. For debugging, you need to check your routes. Try: rake routes | grep pay_bill Something should show up, since the tutorials says to put this in the routes file: match '/billing', :to = 'billing#create', :as = :pay_bill Maybe rereading:

[Rails] Question1 Cucumber Rails

2012-08-31 Thread Fahim Patel
can we write multiple background in one feature file? can we write multiple feature in one feature file.? -- 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

[Rails] Re: hii friends,,,,,i m new to rails......i think there is a problem in destroy command .

2012-08-31 Thread Fahim Patel
can one explain this issue? On Thursday, August 16, 2012 10:33:47 AM UTC+5:30, Fahim Patel wrote: let me explain this problem ---rails destroythis command destroy model,scaffold etc . problem is that if a model or other structure is

Re: [Rails] Re: hii friends,,,,,i m new to rails......i think there is a problem in destroy command .

2012-08-31 Thread Colin Law
On 31 August 2012 15:03, Fahim Patel pafa...@gmail.com wrote: can one explain this issue? On Thursday, August 16, 2012 10:33:47 AM UTC+5:30, Fahim Patel wrote: let me explain this problem ---rails destroythis command destroy

Re: [Rails] Question1 Cucumber Rails

2012-08-31 Thread Jordon Bedwell
On Fri, Aug 31, 2012 at 8:59 AM, Fahim Patel pafa...@gmail.com wrote: can we write multiple background in one feature file? No. can we write multiple feature in one feature file.? Yes. Read: http://pragprog.com/book/hwcuc/the-cucumber-book -- You received this message because you

[Rails] Re: Question1 Cucumber Rails

2012-08-31 Thread Jordon Bedwell
On Friday, 31 August 2012 08:59:48 UTC-5, Fahim Patel wrote: can we write multiple background in one feature file? No. can we write multiple feature in one feature file.? Yes. Read: http://pragprog.com/book/hwcuc/the-cucumber-book -- You received this message because you are

[Rails] Re: hii friends,,,,,i m new to rails......i think there is a problem in destroy command .

2012-08-31 Thread Jordon Bedwell
On Friday, 31 August 2012 09:03:40 UTC-5, Fahim Patel wrote: can one explain this issue? On Thursday, August 16, 2012 10:33:47 AM UTC+5:30, Fahim Patel wrote: let me explain this problem ---rails destroythis command destroy

[Rails] Newbie Q: How to find the user that the question belongs_to

2012-08-31 Thread Nate FT
I have a User and a Question model, User has_many questions and Question belongs_to user. On my question show page, I show a question, along with the name of the user who's asking the question. Everything seems to be working fine, but my controller looks like this: questions_controller.rb . . .

Re: [Rails] Newbie Q: How to find the user that the question belongs_to

2012-08-31 Thread Colin Law
On 31 August 2012 16:26, Nate FT li...@ruby-forum.com wrote: I have a User and a Question model, User has_many questions and Question belongs_to user. On my question show page, I show a question, along with the name of the user who's asking the question. Everything seems to be working fine,

Re: [Rails] Newbie Q: How to find the user that the question belongs_to

2012-08-31 Thread aash dhariya
I guess you are looking for this or probably i misunderstood your question def show @question = Question.find(params[:id]) @user = @question.user end On Fri, Aug 31, 2012 at 8:56 PM, Nate FT li...@ruby-forum.com wrote: I have a User and a Question model, User has_many questions and

[Rails] Re: custom js in rails project

2012-08-31 Thread Axel Aguilar
hi! since the css and js is the zurb foundation, I realize I can install the gem, and I follow the how to in the home page at git-hub (https://github.com/zurb/foundation-rails), and I get stuck in Using foundation in production, I cant use capistrano because I don't know where is the capfile.. so

[Rails] Re: How can an rspec test for a view pass if there's no action for the view in the controller?

2012-08-31 Thread 7stud --
1) Yes, the page shows when I start rails server, and then use the url: http://localhost:300/static_pages/home 2) Everything in public/ was created by rails new: $ ls public/ 404.html 500.html index.html 422.html favicon.ico robots.txt 3) test.log: Started GET /static_pages/home for

Re: [Rails] How can an rspec test for a view pass if there's no action for the view in the controller?

2012-08-31 Thread Walter Lee Davis
On Aug 31, 2012, at 2:49 PM, 7stud -- wrote: 1) Yes, the page shows when I start rails server, and then use the url: http://localhost:300/static_pages/home 2) Everything in public/ was created by rails new: $ ls public/ 404.html 500.html index.html 422.html favicon.ico robots.txt

[Rails] Re: How can an rspec test for a view pass if there's no action for the view in the controller?

2012-08-31 Thread 7stud --
Thanks for the response. Here is my routes.rb: SampleApp25::Application.routes.draw do get static_pages/home get static_pages/help get static_pages/about get static_pages/contact # The priority is based upon order of creation: # first created - highest priority. # Sample of

Re: [Rails] How can an rspec test for a view pass if there's no action for the view in the controller?

2012-08-31 Thread Walter Lee Davis
On Aug 31, 2012, at 4:10 PM, 7stud -- wrote: Thanks for the response. Here is my routes.rb: SampleApp25::Application.routes.draw do get static_pages/home get static_pages/help get static_pages/about get static_pages/contact Yup. I can confirm that with a similar route here in an

[Rails] Re: How can an rspec test for a view pass if there's no action for the view in the controller?

2012-08-31 Thread 7stud --
So this is a route problem? -- 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 post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to

Re: [Rails] Re: How can an rspec test for a view pass if there's no action for the view in the controller?

2012-08-31 Thread Walter Lee Davis
It's a feature of Rails. It's a problem if it causes problems. With the sort of routing you have, it's only going to expose the views you indicate in your routes.rb file. If you had a more liberal route like match 'info/:action' = 'info#action' then it would show any action.html you placed in

[Rails] Delayed Job Question

2012-08-31 Thread Karthikeyan A k
Hello People, I just want to know how the delay job gem works. I am confused how it detects when the server is having less load and does computing intensive job at that time. Or it just tries to do some thing, if it fails, waits for random time and does it again? -- Posted via

Re: [Rails] Delayed Job Question

2012-08-31 Thread thiagocifani
DelayedJob just creates anotar thread and a send the email or execute the method on parallel without stop the ruby thread! You can set a delay to call the method but it does not works as you throught! ;) Sent from my iPhone On 31/08/2012, at 23:47, Karthikeyan A k li...@ruby-forum.com wrote:

Re: [Rails] Newbie Q: How to find the user that the question belongs_to

2012-08-31 Thread Bala Mani
Hai! This tutorials is help for you ... http://guides.rubyonrails.org/association_basics.html by bdeveloper01 -- 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.

[Rails] Basic Paypal

2012-08-31 Thread Khan
Hi all i am following this like for basic paypal http://railscasts.com/episodes/141-paypal-basics and i got this error View: %= link_to Checkout, @cart.paypal_url() % undefined method `paypal_url' for nil:NilClass despite i have this code in my model called Card Cart Model: class Cart