-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Method Error #1352
Comments
In controller the line 140 is @account.update_attributes(permitted_params) with def permitted_params
params[:account].permit(:lock_version, :username, :password, :company_id, :usersgroup_id, :isadmin,
:locked, :newpassword, :password_confirmation, :last_service_id, :last_successful_login,
:total_logins , :password_changed , :password_change_given, :oldpassword , :last_active_at)
end |
What version of JRuby? Similar bugs have been fixed in releases the past few months. |
Latest version, 1.7.9, I switched to jruby just a few days ago... |
Ok, thanks. There's several possible reasons for this that are hard to sort out without a reproducible example. Can you come up with a script or a demo repository that we can use to reproduce? |
I will try to isolate it. The curious thing is that the same syntax works in other models, eg: def startdate_string
self.startdate if self.startdate
end
def startdate_string=(new_val)
if new_val && new_val!=""
just_for_check = DateTime.strptime(new_val, fmt=Time::DATE_FORMATS[:app_date])
self.startdate = new_val
else
self.startdate = ""
end
rescue ArgumentError
@startdate_invalid = true
end |
@PanDar1 it appears you're working with Rails here, I'm not sure how to reproduce this in order to see if it has been fixed in newer versions of JRuby. Would you please provide a reproduction case or at least validate whether the issue is still present for you on newer versions of JRuby? |
no response - probably no longer valid. please let us know if issue persist on latest of JRuby 1.7 |
The following code in accounts.rb
raise this error
NoMethodError (undefined method
newpassword=' for #<Account:0x15fffa6>): app/controllers/accounts_controller.rb:140:in
update'app/controllers/accounts_controller.rb:139:in `update'
The same code runs ok in Yarv
The text was updated successfully, but these errors were encountered: