Displaying 7 results from an estimated 7 matches for "contacts_controller".
2006 Apr 24
3
Rails Recipes Book: Routing Error
Hi,
I''m working on the first rails recipe, InPlaceEditing, and following the
instructions very carefully. After generating the scaffold for Contact,
I then go to the page, thus:
http://localhost:3000/contacts/
I get this error:
Routing Error
Recognition failed for "/contacts/"
What should I be checking for to resolve this problem?
Thanks.
--
Posted via
2009 Jun 07
6
Missing Template when testing with the Brain Buster Captcha partial
...me ==
''edit'' %>
24: <div><%= f.submit "Submit" %></div>
25: <% end %>
app/views/contacts/_form.html.erb:23
app/views/contacts/_form.html.erb:1
app/views/contacts/edit.html.erb:1
app/controllers/contacts_controller.rb:41:in `update''
functional/contacts_controller_test.rb:80:in
`__bind_1244348412_114''
/usr/local/lib/ruby/gems/1.8/gems/thoughtbot-shoulda-2.10.1/
lib/shoulda/context.rb:271:in `call''
/usr/local/lib/ruby/gems/1.8/gems/thoughtbot-shoulda-2.10.1/
li...
2006 Apr 07
1
Validate_presence_of error in nested object is not displayed
...t
class Contact < ActiveRecord::Base
has_one :address
validates_presence_of :first_name ,:last_name
end
.>>> Address
class Address < ActiveRecord::Base
belongs_to :contact
validates_presence_of :address
end
Addres has the following fields ; address, phone, fax, email
In the contacts_controller I have
def create
@contact = Contact.new(params[:contact])
@address = Address.new(params[:address])
@contact.address= @address
@saved = @contact.save
logger.debug @contact.address.errors
if @saved
list
render :update do |page|
page.replace_html "table...
2006 Jun 01
10
Stylesheets not being recognized
I am a newbie, but have worked through 4 or 5 tutorials. I am using
InstantRails. The problem is that I cannot determine how the style is
being included. I have modified the stylesheet from
/public/stylesheets/, even removed it. All to no avail. The inline
<style>...</style> code is still being included from somwhere. Where?
What am I missing?
thanks,
steve
--
Posted via
2007 Apr 21
0
Auto_complete
...ler
auto_complete_for :contact, :first_name
But this is all l get
NoMethodError in ContactsController#index
undefined method `auto_complete_for'' for #<ContactsController:
0x3384570>
RAILS_ROOT: script/../config/..
Application Trace | Framework Trace | Full Trace
app/controllers/contacts_controller.rb:8:in `index''
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/
action_controller/base.rb:1095:in `send''
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.1/lib/
action_controller/base.rb:1095:in `perform_action_without_filters''
/opt/local/lib/ruby/gems/1.8/gems...
2006 Jun 19
3
Parent Child form using Partials
I am trying to make a simple application which consists of contacts and
their addresses.
class Contact < ActiveRecord::Base
has_many :addresses
end
class Address < ActiveRecord::Base
belongs_to :contact
end
I would like to be able to edit/add addresses from within the edit/add
of the contact. I scaffolded the contact and address objects and
modified the contacts/_form partial as
2006 Nov 06
21
acts_as_ferret and associations
I have the following models:
class Book < ActiveRecord::Base
acts_as_ferret
belongs_to :author
end
class Author < ActiveRecord::Base
has_many :books
end
and in the controller:
def search
if params[:query]
@query = params[:query]
@total, @books = Book.full_text_search(@query, :page =>
(params[:page]||1))
@pages =