Colin,
User.active.first(:conditions => ["username LIKE ?, params[:id])
The above code is wrong. here your are trying to fetch the list of the
active users and fetching the first record
then checking the username with id value. the entire code seems wrong
also in params[:id] you have to get I
On 31 March 2016 at 10:05, Naveed Alam wrote:
>> It depends on whether that is ever supposed to be nil. If it is then
>> you just need to test for that in your code before using it.
>>
>> Colin
>
>
> In my controller's edit_privilege method I changed the below line
>
> from
> @user = User.active.
> It depends on whether that is ever supposed to be nil. If it is then
> you just need to test for that in your code before using it.
>
> Colin
In my controller's edit_privilege method I changed the below line
from
@user = User.active.first(:conditions => ["username LIKE
BINARY(?)",params[:id]
3 matches
Mail list logo