Re: [Rails] Javascript file path

2011-12-05 Thread clanlaw
> "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 > rubyonrails-talk+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/gro

Re: [Rails] Re: Newbie route issue

2011-12-05 Thread clanlaw
On 5 December 2011 17:48, David Burton wrote: > Thanks > > To get my menus to work, > I had to change the routes.rb > > From: >  get "contact/index" > > To: > >  resources :contact > > I must be using the generate command incorrectly? > > I used: $ rails generate controller contact index > > Shoul

Re: [Rails] Re: Store XML format data into database

2011-11-03 Thread clanlaw
On 3 November 2011 14:47, Preksha Patel wrote: > Hi, > > Now I am not getting an error but XML values are stored like '--0 \n'. > > Code is: > >  doc.xpath('//item').each do |tag| >       @req = Hash.new >       @req = tag.children[9] Have you used ruby-debug to break into the code here and see w

Re: [Rails] hai

2010-10-15 Thread clanlaw
On 15 October 2010 06:44, jeni wrote: >  I Need to know the basic of the ruby on rails and how to write a > program on it.if u send a quick reply it will very useful Have a look at the Rails Guides, http://guides.rubyonrails.org/ Colin -- You received this message because you are subscribed to

Re: [Rails] ror models relations - advice ?

2010-09-25 Thread clanlaw
On 24 September 2010 23:56, radhames brito wrote: > class Game < ActiveRecor::Base > has_many  :teams > > > class Team < ActiveRecor::Base > belongs_to :game That will only allow a team to be involved in one game, is that is what is required? Colin > > > > call designation of a game like this >

Re: [Rails] Newbie Moving on to Rails

2010-08-26 Thread clanlaw
On 26 August 2010 09:21, Guillermo Riojas wrote: > Hello everyone, > Currently i have been in the process of learning ruby for about 6 > months, so far so good =). Now, the project i have been working on, is > pretty much done, unfortunately there is no user interface for "end > users" to work wit

Re: [Rails] Problem with consecutive GET requests in integration test

2010-08-26 Thread clanlaw
On 26 August 2010 06:28, Georgie Porgie wrote: > class UserStoriesTest < ActionController::IntegrationTest >  test "some test" do >    get "/" >    assert_response :success >    get "/" >    assert_response :success >  end > end > > When I run the code above the first assertion passes. However, th

Re: [Rails] Advice on rating system

2010-08-26 Thread clanlaw
On 26 August 2010 08:29, Greg Ma wrote: > Hi, > I'm doing a simple rating system, but I need and advice on the > controllers. My system rates article. > > Should I add an action rate in the article controller or should I create > a rate controller and add the action create? > What's the cleanest w

Re: [Rails] Sending Emails to Inbox

2010-08-26 Thread clanlaw
On 26 August 2010 07:52, Saurabh Peshkar wrote: > Hi All, > > I am having a functionality of sending emails in my rails application. > Sending the emails is working properly but sometimes the email goes to > Inbox folder and sometime it goes to Spam folder. I am sending one email > at a time, ther

Re: [Rails] Having trouble with link breaks in a table

2010-08-26 Thread clanlaw
On 26 August 2010 07:38, Bob Smith wrote: > I have table being filled by a partial. When the fields are filled, > the fields end up together or not there for half a page. See below. My > controller code and views are below.. > > controller: >   �...@single = Array.new >    for @h in households do

Re: [Rails] @cart.add_product(product)

2010-08-26 Thread clanlaw
On 26 August 2010 07:04, pravin mishra wrote: > Any one can explain me > > in agile web development book in chapter Cart Creation > > depot_f/app/models/cart.rb > > class Cart >  attr_reader :items >  def initialize >   �...@items = [] >  end > >  def add_product(product) >   @items << pro

Re: [Rails] Re: Re: Re: Rails - references ???

2010-08-14 Thread clanlaw
On 14 August 2010 15:59, Abder-Rahman Ali wrote: > clanlaw wrote: >> On 14 August 2010 13:48, Abder-Rahman Ali wrote: >>>> Colin >>> >>> I found that there is a "post_id" column in the "comments" table. >> >> There you are

Re: [Rails] Re: form_for

2010-08-14 Thread clanlaw
On 14 August 2010 15:34, Abder-Rahman Ali wrote: > Frederick Cheung wrote: >> On Aug 14, 2:23�pm, Abder-Rahman Ali wrote: >>> form_for: used to generate a form. >>> @post: the object form_for is bound to. >>> >>> The part I didn't get here is: >>> >>> @post.comments.build >>> >>> What does that p

Re: [Rails] error_messages

2010-08-14 Thread clanlaw
On 14 August 2010 15:09, Abder-Rahman Ali wrote: > At: http://edgeguides.rubyonrails.org/getting_started.html > > Under: 7.4 Generating a Controller > > In the following: > > <%= form_for([...@post, @post.comments.build]) do |f| %> > <%= f.error_messages %> > > What is: <%= f.error_messages %> > >

Re: [Rails] Re: Re: Rails - references ???

2010-08-14 Thread clanlaw
On 14 August 2010 13:48, Abder-Rahman Ali wrote: > Colin Law wrote: >> On 14 August 2010 13:26, Abder-Rahman Ali wrote: >>> I saw down few lines in the tutorial the following: >>> >>> The t.references line sets up a foreign key column for the association >>> between the two models. Go ahead and r

Re: [Rails] Returning last value

2010-08-03 Thread clanlaw
On 3 August 2010 14:17, Bla ... wrote: > Hi. > > I have the following controller of the update action: > > [code] > def update >   �...@projeto = Projeto.find(params[:id]) > >    if (@projeto.update_attributes(params[:projeto])) > >    ## Mesmo raciocínio utilizado no create. >   �...@permissaoa =

Re: [Rails] [Help] Rake test:functionals failed.

2010-05-17 Thread clanlaw
On 17 May 2010 10:38, neckie wrote: > Hi all, > Im a new user for using Rails, > I got the 3 error msg as belows, >... > rake_test_loader > Started > F.F.F...

Re: [Rails] Re: Agile Web Dev (book) question: errors

2010-05-17 Thread clanlaw
On 17 May 2010 02:50, Orient Fang wrote: > > HI, > I have almost the same issue when I follow the 3rd Edtion. > but I verified the every type characters, there should be no mistakes. > Any one could help? > - > SyntaxError in StoreController#add_to_cart > D:/InstantRails/rails_apps/lzpback

Re: [Rails] form_for Values Are Not Visible

2010-05-14 Thread clanlaw
On 14 May 2010 02:22, Joshua Martin wrote: > I'm using this form in an edit page to update a person. For some weird > reason, when I view this form in the browser... The text field's value is > set to the person's firstname, but it does not display in the browser. > > The form works perfectly on W

[Rails] Re: migrating from rails 2.1.0 to rails 2.3.3

2009-09-24 Thread clanlaw
2009/9/24 san2821 : > Hi All, > > I wanted to migrate project from rails 2.1.0 to rails 2.3.3 > so, i changed version in environment file but it shows me memcached-client > error. > > http://funonrails.wordpress.com/2009/09/24/migrating-project-from-rails-2-1-0-to-edge-rails-2-3-3/ > To update th

[Rails] Re: Parameter passing problem ..

2009-09-24 Thread clanlaw
2009/9/24 Hemant Bhargava : > > There are also some more errors for label. > In source code .. I mean when i view page source labels are of type:- > td> > > onclick="changeBackgroundColor(this.id);"> >   >     name="qualification_ids[]" value="37" /> >    FRCA >   > > > And this code is also gi

[Rails] Re: named_scope, sql-view.

2009-09-24 Thread clanlaw
2009/9/24 Luis Enrique : > > I am looking for a way to create , ( and this is the part I really do > not know) a method a named_scope a something… > that allows me to create an query where I can combine several columns > from different tables. > In plain sql I could create a view and work with it;