SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    May 2012
    Location
    Karkala, India
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    undefined method telephone_record............telephone_record_path class<...>

    model

    HTML Code:
    class TelephoneRecords < ActiveRecord::Base
       attr_accessible :rowid, :selectcity, :match , :phone_no, :name, :address 
       validates :selectcity,  :presence => true
       validates :match,  :presence => true
       validates :phone_no,  :presence => true
       validates :name,  :presence => true
       validates :address,  :presence => true
    end
    controller
    HTML Code:
    class TelephoneRecordsController < ApplicationController
     
    def index
     @telephone_records = TelephoneRecords.all
    end	
    
    end
    index view
    HTML Code:
    <%=form_for @telephone_records do |f| %>  
    <%end%>

  2. #2
    SitePoint Member
    Join Date
    Mar 2013
    Posts
    16
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    TelephoneRecords.all to TelephoneRecords.new maybe?

    I dont get why you are making a query to select all data and generating a form with that data


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •