Being new to Ruby and Rails I am finding some hurdles that kind of
slow my progress.
1. What is the difference between the 2 statements:
staff = Staff.find(params[:id])
@staff = Staff.find(params[:id])
I find books and articles using either of them but I fail to grasp why
this should be different
2. This piece of code does not work and I have no idea why:
@subscriber = Subscriber.new(params[:subscriber])
the function activate is defined in the model:
@active = 1
(active beeing one of the row of the table).
Result: this does not set active to 1.
If in my controller I set @subscriber.active = 1 then it works and the
row is saved with active set to 1.
Thanks for your help !!!