Do they belong to you? Claim these comments.
SA
Is this you? Claim Profile »
5 months ago
in Cooler on e168f08
last minute cleaning-
I was making the code clean now few things don't work and I do not know why.
My logout does not logout anymore -
Console shows that email is genereated and sent, but i never get in my inbox.
I was making the code clean now few things don't work and I do not know why.
My logout does not logout anymore -
Console shows that email is genereated and sent, but i never get in my inbox.
1 reply
xertroyt
Nothing is really coming to mind -- sorry!
5 months ago
in Assignments on e168f08
that does work in my console window, but it does not return anything in the controller.
e.g. if i say email=params[:user][:email], and then used it like this: User.find(:first, :conditions => "email = email"), it does not return anything. The only way it works if I hardcode that email in the query.
e.g. if i say email=params[:user][:email], and then used it like this: User.find(:first, :conditions => "email = email"), it does not return anything. The only way it works if I hardcode that email in the query.
1 reply
xertroyt
User.find( :first, :conditions = [ 'email = ?', email ])
or
User.find( :first, :conditions = { :email => email } )
In both cases, the last "email" in the state is a variable for the e-mail address you want.
For both of these constructs: Review AWDR!! The first is about using parameters for a SQL query. The 2nd is about using a Hash for the conditions. I like the latter for simple finds.
or
User.find( :first, :conditions = { :email => email } )
In both cases, the last "email" in the state is a variable for the e-mail address you want.
For both of these constructs: Review AWDR!! The first is about using parameters for a SQL query. The 2nd is about using a Hash for the conditions. I like the latter for simple finds.
5 months ago
in Assignments on e168f08
Will there be a solution posted for project 3?
Also I am having problem with this. I have a table - users, which has email column. Now i want to enable all users to search the user table with the query 'email'.
<%= form_tag( { :action => :find, }, { :method => :post }) %>
<%= text_field "user", "email", "size" => 20 %>
Search with the email
<%= submit_tag( "Search" ) %>
Well, the controller that handles is 'search' controller.
I have tried getting the email and print it out on the screen, but it always prints nil. How do I get this attribute?
Also I am having problem with this. I have a table - users, which has email column. Now i want to enable all users to search the user table with the query 'email'.
<%= form_tag( { :action => :find, }, { :method => :post }) %>
<%= text_field "user", "email", "size" => 20 %>
Search with the email
<%= submit_tag( "Search" ) %>
Well, the controller that handles is 'search' controller.
I have tried getting the email and print it out on the screen, but it always prints nil. How do I get this attribute?
1 reply
Keith
How are you trying to access the email field? params[:user][:email] should work.
7 months ago
in Assignments on e168f08
I cannot find the rest of the assignment 3? Where is the instructions for that? I've downloaded the zip with migration one, but the doc-file is empty of instructions.
1 reply
xertroyt
That download shows only the mgrations and associations for the first milestone -- it is, effectively, the "solution" for the first (optional) milestone -- I am still working on getting the list of "finds" for milestone II and the final version of Assignment 3 to you.
8 months ago
in Videos on e168f08
I am having trouble watching 5th lecture. I have tried on three different dsl services. The latest one is about 1Mbps. Somehow, it keeps breaking. I do not have issues with the other lectures so far.
show all 3 replies
3 replies
xertroyt
I have asked Harvard to review the video.
xertroyt
Our contact at Harvard says that they don't see any problem, and asks: "Is he trying the flash or real player? I would tell them to hit the "report a problem" button and someone will help them work through the issue."
NA
For me it is working fine
9 months ago
in Assignment 2 on e168f08
On running the demo.rb, I get
>ruby demo.rb
Demonstration of instantiation of a hand, then checking how strong it is.
demo.rb:6: undefined method `accept' for #<Hand:0x2b1572c> (NoMethodError)
>ruby demo.rb
Demonstration of instantiation of a hand, then checking how strong it is.
demo.rb:6: undefined method `accept' for #<Hand:0x2b1572c> (NoMethodError)
1 reply
xertroyt
The demo won't work until you finish the assignment -- i.e., demo is for "final checkout."
I am planning to do a screencast that will show you what the demo will look like when you're done.
I am planning to do a screencast that will show you what the demo will look like when you're done.
9 months ago
in Assignment 1 on e168f08
I am having this output when i run the solution test.
C:\assn1-1.0.0\test\other>ruby solution_set_test.rb
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_re
quire': C:/assn1-1.0.0/student_solution_set.rb:244: syntax error, unexpected $en
d, expecting kEND (SyntaxError)
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re
quire'
from solution_set_test.rb:4
C:\assn1-1.0.0\test\other>ruby solution_set_test.rb
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_re
quire': C:/assn1-1.0.0/student_solution_set.rb:244: syntax error, unexpected $en
d, expecting kEND (SyntaxError)
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `re
quire'
from solution_set_test.rb:4
1 reply
xertroyt
"syntax error, unexpected $end, expecting kEND"
Look at your code and verify that all blocks are ended correctly.
Look at your code and verify that all blocks are ended correctly.
9 months ago
in Protected: Downloads on e168f08
My password is somehow not getting accepted. What should I do?
1 reply
Morris
You shouldn't be using your personal password. You should be using the common password for this page, that was announced in the first lecture.
That password is still working, as of a few minutes ago.
But some time in the next few days, the password to this page will change to a new user/password combination that John announced in last night's lecture (October 1).
That password is still working, as of a few minutes ago.
But some time in the next few days, the password to this page will change to a new user/password combination that John announced in last night's lecture (October 1).
9 months ago
in Assignment 0 on e168f08
I got the problem fixed. I reinstalled ruby on windows, and somehow it worked the second time.
9 months ago
in Assignment 0 on e168f08
I have installed everything, but when I type rails test or rails assn0, I get an error that there is no inernal command as rails. My ruby script/server is not running either.
1 reply
xertroyt
How did you install Rails? Can you find the rails command on your disk?
Windows? OSX? Linux? Help us out!
Windows? OSX? Linux? Help us out!