1
0
Fork 0
mirror of https://github.com/heartcombo/simple_form.git synced 2022-11-09 12:19:26 -05:00

fix warnings in tests

This commit is contained in:
Vasiliy Ermolovich 2011-12-17 13:57:43 +03:00
parent 6943b37d64
commit b2230076ed
2 changed files with 3 additions and 2 deletions

View file

@ -6,7 +6,7 @@ class MockController
end
def action_name
@action_name || "edit"
defined?(@action_name) ? @action_name : "edit"
end
def url_for(*args)

View file

@ -45,6 +45,7 @@ class User
:post_count, :lock_version, :amount, :attempts, :action, :credit_card
def initialize(options={})
@new_record = false
options.each do |key, value|
send("#{key}=", value)
end if options
@ -55,7 +56,7 @@ class User
end
def persisted?
!(@new_record || false)
!@new_record
end
def company_attributes=(*)