« first day (50 days earlier)      last day (1086 days later) » 
00:00 - 16:0016:00 - 00:00

00:36
AmandaC537: Is anybody able to help me with HW4?
SadiaWaleem_: Can anybody help me as I am stuck on second part of HW4 part 2?
SadiaWaleem_: just need a bit help for routes.rb
MMan: shoot
01:17
hfp: Hey guys we added factory_girl_railsto our Gemfile. It installed v 4.4.1 but now rspec won't run. It returns this error: /Users/hfp/edx/cs169.1x/SaaS.1/hw4/myrottenpotatoes-hw4/config/application.rb:7‌​:in require': cannot load such file -- active_resource/railtie (LoadError)`. Is it because Factory_girl_rails 4.4.1 doesn't work with Rails 3.2?
aakhedr_: MMan: could you please have a look at this thread here? edx-cs169-1x.stackexchange.com/questions/2585/…
MMan: gem install libv8 -- --with-system-v8
aakhedr_: MMan: I tried that too - same error!
AmandaC537: Real quick, how do I create a migration? I forgot the command line argument
MMan: google rails migration generate
AmandaC537: Okay thank you!
aakhedr_: ERROR: While executing gem ... (NoMethodError) undefined method `size' for nil:NilClass
01:57
jonathankyim: does anyone know why in the rspec file: should have_field(:director) gives an error message: undefined method has_field?
02:08
e-jambon: MMan : so what : nodejs or libv8 ? Any enlightment as why choose one over the other ?
e-jambon: jonathankyim: because should have_field translates to the .has_field? method on the object you said should have that field.
02:31
AmandaC537: Another question, I'm having problems with my routes. I am failing three of my tests (unfortunately causing 100/500) because it can't find the routes
AmandaC537: The message is: No route matches {:action=>"similar", :controller=>"movies", :movie_id=>nil}
AmandaC537: Can someone please help?
xiao-ke: what's the password of root user in the saas VM?
TomResh: I am getting the error during bundle install nokogiri gem fails to install saying libxml2 version 2.6.21 or higher is required
TomResh: any ideas how to fix this?
03:10
ChadMiller: xiao-ke: "saasbook", like the username
03:58
cmplin: In hw4, anyone knows how to route to home page in 3rd scenario in cucumber part? thx
04:43
migane: What is rag3.gems file for in HW3 rottenpotatoes folder? And how is it generated?
05:01
e-jambon: -+
migane: what does it mean?
e-jambon: That I made a random keystroke by mistake
migane: ah, do you know what is the rag3.gems file inside HW3 rottenpotatoes folder?
e-jambon: Hmm what what ?
e-jambon: Can't remember of that file...
migane: I just discover it today, while pushing in turn HW2, HW3 and HW4 or heroku.
migane: googling for it does not lead to anything
migane: it has inside it a list of old gems file, like a Gemfile.lock
e-jambon: I don't know migane.
migane: No, problem, thanks , that was just to not go to the grabe without knowing it.
TomResh: I am getting the error during bundle install nokogiri gem fails to install saying libxml2 version 2.6.21 or higher is required
e-jambon: I guess it's a backup that made it here by mistake.
migane: Yes, probably.
e-jambon: TomResh: on windows ?
e-jambon: TomResh: vm ?
TomResh: no, in linux
TomResh: yes
e-jambon: not 100% sure, but I think there were instructions at some point to install that.
e-jambon: I can't check right now, but if you check EdX course / online ressources / VM there is a link to the github somewhere and there is a script being used.
e-jambon: I think it was updated and maybe you will find what you need to do there
e-jambon: Probably a sudo apt-get install libxml2 would suffice, but I am not sure. Might be worth trying.
e-jambon: update / upgrade though if you want to install latest version available for ubuntu 12.04 (I think it's the vm version)
05:26
lroca88: Hello I have a doubt with rspec task in hw4
migane: which one?
lroca88: It's working with Movie.create
lroca88: but not with stubs and mock
lroca88: pastebin.com/hTcc9FTr this is my code
lroca88: I commented stubs and mock
lroca88: This way is working, but when I use Movie.stub(:find).and_return (@current_movie) is giving me this error:
lroca88: Failure/Error: get :same_director, {:id => 1} TypeError: can't convert Symbol into Integer
lroca88: something with Symbol and Integers type, and I don't know where is the problem :)
phamh9090_: @Iroca: try '1'
lroca88: phamh9090_, where??: get :same_director, {:id => '1'}
phamh9090_: yes
migane: you may try first to fake results in before each, then call should_receive(:method).with(parameters).and_return(fake_results)
migane: method being something else than pure find
lroca88: phamh9090_ : Failure/Error: get :same_director, {:id => '1'} TypeError: can't convert Symbol into Integer
lroca88: its saying the same
lroca88: migane: I don't catch you try to say me
lroca88: Movie.should_receive(:find_by_title).with('E.T').and_return(@current_movie)
lroca88: migane: Maybe that???
migane: no not find, but the method in model
lroca88: ooppps
lroca88: my method is in controller
lroca88: same_director
migane: and the parameter in model
lroca88: this is my method
migane: yes, but you call model method from the controller
lroca88: Movie.should_receive(:same_director).with('1').and_return(@current_movie)
migane: not with 1, you don't pass id to Model, do you?
migane: I mean from the controller
Lohhari: it certainly is one way
Lohhari: i made an instance method out of Movie#similar, but i'm not sure if it's the rails way of thinking
migane: Yes, it can be done also.
migane: you mean in your model you have one class method and one instance method for the same thing?
migane: See Saas HW4 (CS169.1X) TDD Cheat Sheet video: ww.youtube.com/watch?v=mq0hZAauhzQ at about 53:39
06:25
Lohhari: migane: i don't have a class method for similar, only instance
Lohhari: i first select the instance, then call the instance's similar method
migane: That's strange, because as it generates a list of movies, it is more a class method than an instance method, but well just my point of view.
06:39
Lohhari: true. i guess the options are Movie.similar(movie), Movie.similar(id) or Movie#similar(). in a way the first makes most sense
migane: what makes the most sense to me is Movie.similar(director)
Lohhari: if you write that in English it does not make sense
migane: I don't know, not native English speaker :-)
Lohhari: Give me a list of movies that are similar to this director
Lohhari: me neither :)
migane: lol
migane: well in this case, just change the method name to has_same_director
migane: or better to have be good english: have_same_director
Lohhari: my Movie#similar actually takes the field name as a parameter
Lohhari: which is probably a good way to get create security problems but anyway... :)
migane: Yes, I understand
migane: and more yes for the second line
migane: and maybe also trouble in the database as implicit it relies on the id being coupled with the director
Lohhari: in a real situation you would obviously have a Director table and the Movie table would contain a director_id
Lohhari: or a Person table, but anyway
migane: sure
migane: don't say it too loudly otherwise we will have a part 3 Saas course with really advanced topics
Lohhari: :)
Lohhari: i think i'll take a stab at the Coursera Reactive Scala course next
migane: Yes, I've also enrolled in it, though I'm absolutely not a fan of java stuff.
Lohhari: Scala's faaar from Java even if they share some API
migane: oh, that's not the impression I have at first glance, but we will see.
Lohhari: i watched some of the "basic stuff you should know inside out before you start" videos yesterday. sheesh. i took the functional programming in scala course a couple of years ago and those were the most advanced topics
migane: I wonder also how it will go with our kind of special Java on Mac OS X
Lohhari: for ( x <- 1 to n ; y <- 1 to x; isPrime(x+y) ) yield (x, y);
migane: Kind of rubyish this one
Lohhari: it's fp
migane: I've taken recently a functional scheme programming, my gosh it was terribly difficult. with graphs, trees, and so on. Much more difficult than ruby, for me at least.
migane: my brain exploded while doing recursion on those beasts.
Lohhari: yes, my first university programming course was in scheme. i had a hard time grasping the thinking
migane: I had no university programming course, it did not exist at the time I was at the university
Lohhari: so i ended up writing imperative scheme for the assignments and got terrible grades :)
migane: I understand so much :-;
Lohhari: you're prety old, scheme was created in 1975 :)
migane: I'm 63
Lohhari: cool
Lohhari: i think my 69 year old dad took some FORTRAN courses during his physics studies
migane: I've begin programming in 1973, but all from the try it yourself method, you know, so that I'm missing all those basic stuff: patterns, and so on.
migane: I've took some courses while at companies. In France, that was the only way to go at that time.
migane: and of course we hacked like mads the source code, till the assembly level code.
Lohhari: the actual computer science program was only created in 1986 in Helsinki University of Technology
migane: I don't remember in France, I think probably they were created first in Institute of Technology, then in High Schools, then in University. not sure though.
e-jambon: Français donc, migane. SI j'aurais su, j'aurais fait un hangout avec toi...
e-jambon: (j/k)
migane: je l'ai implicement dit plusieurs fois, il faut lire entre les lignes... :-)
migane: "si j'aurais su", shame on you!!!!
e-jambon: Hey , sms generation ;p
migane: sure, I have about the same difficulty to understand sms that recursion on graphs in scheme, so to say.
e-jambon: soooo damn true (same here)
e-jambon: or russian... maybe if tortured....
migane: apart from cpaciba, I don't know if it makes a conversation.
migane: I learnt it some 35 years ago, so I don't remember anything apart the alphabet.
e-jambon: So migane, did you use perforated cards to program ?
Lohhari: but a 63yo frenchman who studies fp and chats in fluent english in IRC. i sincerely wish there were more people like you :)
migane: At the very beginning it was not perfored cards, it was perfored ruban, so no way to modify the program if you made a mistake. If was in hexadecimal on truly huge machines.
migane: They are but they don't dare to say it.
Lohhari: i have to say that my experience with a lot of frenchmen that they are not very open towards non-french speakers. and the government tries to enforce it
migane: in particular female in this domain.
e-jambon: Well, 2 french currently chatting right now Lohhari.
Lohhari: yeah, it's great that you guys exist :)
e-jambon: And migane : i guess if I was a woman, I would clearly not mention...
migane: the problem in France is that the language course are terribly inefficient. When I was in school, I was taught German, but it was as Goethe spoke it. Imagine the first time I went at butcher's in Germany, not only able to buy a single piece of meat, but I could talk about nifty details of Kant philosophy during hours, not obvious place it in party if you know what I mean.
Lohhari: i work for an international software company and about a third of our small office personnel in france have the confidence to write us in english. 2/3 have to use interpreters. it's strange
Lohhari: :D
e-jambon: O.o
Lohhari: then again, i heard of this finnish guy who had lived in france for a couple of years and still had problems getting a baguette from his baker
e-jambon: A software company ?
Lohhari: yes
migane: e-jambon: as a woman who does not think she is the half of a man, I dare to say it :-;
Lohhari: well the software is for the construction domain so those guys are construction engineers i believe
e-jambon: I could not cope with the idiots around, migane, sincerly. I would just not bother mentioning that is.
e-jambon: My own sister tells me every few days a new "today a guy" story... I believe one must be tired of male behavior sometimes...
Lohhari: we also have a french guy working in english at our office here in finland so i know it's possible ;) still, there are 5 spaniards for that 1 frenchman
Lohhari: but maybe the economy is doing a bit better in france
e-jambon: Well, the fact is you're right about the government not particularly welcoming French polyglot people. But I'm afraid the reason is not the one you might expect. It's all about their own mediocrity.
lroca88: Hello friends I solved the issue with TDD in hw4
lroca88: this is my actual file for rspec pastebin.com/hTcc9FTr
e-jambon: Ah lroca
e-jambon: Hey there mate
lroca88: hey bro
lroca88: But I still having 400/500
lroca88: Failed coverage test (controllers coverage too low).
lroca88: What can I do to get up my percents
lroca88: in controllers coverage???
e-jambon: You are not testing the index, are you ?
lroca88: nop, I'm testing the same_director view
Lohhari: government mediocrity is most certainly an universal problem. it just manifests in different ways
lroca88: how can I test both, same_director and index???
e-jambon: I mean moviescontroller#index => make a test for it.
lroca88: mmm
Lohhari: but i would think there's still a bit of the world domination complex left. the french government refuses to speak the universal language and the anglophone governments refuse to use the universal measuring units
lroca88: e-jambon: I only testing same_director method, controller is plenty of other methods
lroca88: thanks ;)
e-jambon: lroca88: test them then, to cover more of the code.
lroca88: Ok jejej
e-jambon: lroca88: obvious but...how else would you cover more code ^^
lroca88: e-jambon: Have you luck with bootstrap and RoR
lroca88: ??
e-jambon: Not really, I did not insist I had other stuff to learn
lroca88: What framework do you use for front_end applications??
e-jambon: None so far. I might consider bootstrap though, because it's pretty complete and understandable, with grunt uncss to clean everything.
e-jambon: Lohhari: It is somewhat true, but the fact is : our leaders just were not polyglot (at least the a huge majority) and still are not.
Lohhari: what a stupid reason, sigh...
e-jambon: Lohhari: They would not let polyglot people take the stage, because they would sound...ridiculous (and they are, sincerly).
e-jambon: It's even worse : they try and use words they clearly do not understand. Simple words that is.
e-jambon: Hmm no
e-jambon: I mean yes, something the like but...
e-jambon: Nowadays it's somewhat worse : they try and fail.
e-jambon: I mean they try to look like they know, and fail because they do not.
Lohhari: by the way, that's the Finnish president's speech for the Helsinki olympics 1952
e-jambon: I understood that much, hehe
e-jambon: youtube.com/watch?v=rp5IF41b8zs is sort of ...sad but funny
Lohhari: oh my...
e-jambon: I particularly like "time" instead of "weather". (same word in french, litteral translation but... won't work).
Lohhari: right. well that happens to all of us until we are very fluent with the language
e-jambon: Unfortunately, they are not that much better with their own language.
e-jambon: hehehe
Lohhari: :)
e-jambon: I can give you so many examples of people trying to sound doctorate about things using english term they OBVIOUSLY do not understand....
Lohhari: my spanish often sounds rediculous when i just try to translate an english (or finnish) language sentence word by word
Lohhari: ri*
Lohhari: but still i usually get my message through most times
e-jambon: Same thing for me with english. But I am no leader ^^
e-jambon: My ex boss convincing someone that he did send an email "Yes I sent it. It was in your mail". Next 3 minutes : - why did you not email it ? - I did - then I did not receive - I tell you it is in your mail - but you just said...- no I said it's in your mail. - doh. So email or mail ? - Yes, mail. ... Now imagine sitting there and you'll get the picture.
migane: ?!? lol
e-jambon: Open Office Firewall, -- pour protéger le bureau aux heures d'ouverture, hein...
migane: rofl
e-jambon: Migane, how many times did you actually explain / or refrained from explaining that word != world.
migane: That's my problem. I cannot refrain. Yesterday in a hangout, I was told that Frenchies are very telling... So not sure it was something good or bad...
migane: It is hard for me to imagine that people have ideas about other people witout even knowing them. but c'est la vie!
e-jambon: Ever explained a Frenchie that "internet c'est un net de nets" , after they used the term "net" a dozen time in a "pseudo" technical discussion, just to see their face ?
Lohhari: :)
migane: Imagine better, translate of the technical words into French, then use it in a discussion, you will enjoy much more the faces around you :-)
e-jambon: OHhh but I do.
Lohhari: there's a government agency in finland whose job is to create new words to the finnish language to match new words in other languages, mostly technical terms in english. they create the term and everyone keeps using the english word
Lohhari: not a very hard choice between swap and heittovaihtomuisti
migane: sure
migane: not to mean offence, but more concise
e-jambon: It is VERY funny. I regularly hear "But...that's not how it works, because there is XXXX", XXXX being the english translation of that exact same word I just explained to them in French for 2 minutes.
migane: too much as we say in France
e-jambon: Right. But you two do know what to swap means. French people, for the extreme large majority, think that swap is savon (soap).
Lohhari: :)
migane: and what do they do with soap in programmation? blow bubbles
e-jambon: you mean with SOAP ?
migane: why not?
e-jambon: They exchange things... but then all of a sudden, SOAP, swap... exchange... c'mon...
migane: lol
e-jambon: things, objects...Oh my god...
Lohhari: sometimes we get into trouble with the pronunciation though. i had to think for a moment what the lecturer meant when he talked about [laib] folder (lib/)
Lohhari: we'd just call it [lib] like the finnish pronunciation
e-jambon: Yeah like the famous french word : Dihellhell (stands for dll). That's another funny word. I heard soooo many techies using it but not understanding why I was talking about libraries....
Lohhari: :)
Lohhari: dälli in "finnish"
migane: I don't regret to have come here this morning, it has revivifying side effects.
e-jambon: This morning I'll go get my 5yo kids. Before driving them to school I asked : "Do you know the Shadocks" and my daughter answered :
e-jambon: "Yes, it's Donald's cats".
e-jambon: (that can only be understood by Migane)
migane: another time,
e-jambon: (donald duck)
Lohhari: luckily for you 50% of english words are from french anyway
migane: sure, I have the cd, very difficult to go to the high level. It has a Mother day gift. Somethimes I wonder if my children think I was born at the same time as Vercingetorix
migane: yes, sure, it is surely more easier for us than for you.
e-jambon: lol
migane: They are about 40, go figure.
Lohhari: but in the nordic countries we have the huge benefit of not dubbing anything besides children's programs. everything on tv is in the original language
migane: Ah, that's much better to learn a language
Lohhari: it at least makes most european languages sound familiar and distinct
e-jambon: Lohhari, isn't it usual to leave the country a couple years when you're done studying (or near the end of them) ?
e-jambon: -
e-jambon: * them being studies
Lohhari: it's not rare at least. i studied a year in a mexican university
Lohhari: and my sisters and most of my cousins have spent at least a year abroad
e-jambon: I think spending some time abroad is the exception in France. No one ever suggested to me it was even a possibility.
migane: You have erasmus program though for university
Lohhari: yeah, i know a lot of people who have gone to france and other european countries from finland through erasmus
e-jambon: Sadly, none of my teachers ever mentioned Erasmus. It was too late when I discovered its existence (in the 90s)
migane: oh, that's not fair of them.
e-jambon: I was sooo not motivated anyway...
e-jambon: << because I'm stupid / was ?
migane: no, it depends of each person. Some people likes travelling other don't and that's good.
e-jambon: Oh I love it. I worked about 1yo in Africa, a couple month in london, and a couple in Melbourne.
e-jambon: Just that I was motivated by then.
migane: ah. I'm always motivated for the unknown, much less by the known
e-jambon: I was not... at that time. Something to do with being a teen vs a young man...
e-jambon: hehe
09:50
VijayU: hey, just a weird query, if I touch 75% can it considered as pass or should I score 76 to get passed..?
VijayU: Somebody there to help me...? please
Lohhari: VijayU: i'm pretty sure 75% should be enough
Lohhari: "at least 75% overall" says the syllabus so yes it is >=
VijayU: Thank you so much.
demoniszcze: Heck, I'm no good at switching between bdd and tdd
MimiBambino_: On HW4, can someone tell me what file I should past the Cucumber tests from PasteBin into?
demoniszcze: MimiBambino_: file_name.feature and you need to put it inside features folder
MimiBambino_: Thank you!
demoniszcze: MimiBambino_: cheers!
demoniszcze: I'm not sure when should we use Rspec tests
demoniszcze: after writing passing step definitions?
demoniszcze: mmm writing rspec tests is trully the hardest part
MimiBambino_: Are the Rspec tests in lieu of step definitions? I'm not clear on that either.
demoniszcze: MimiBambino_: I think we need to write both
demoniszcze: but to be completely honest, I'm confused myself
Lohhari: one way is to write cucumber tests to test the views and rspec tests to test the controllers and the models
Lohhari: so rspec calls methods and checks return values (and instance variables). cucumber fills fields and clicks buttons and examines the resulting URL's and page content
demoniszcze: kinda makes sense
demoniszcze: but should I alternate between writing bdd and tdd or is it ok to write, say, all the steps definitions first, and then concentrate on rspec
Lohhari: well, in theory at least you are supposed to write all tests before you write the corresponding implementation
Lohhari: is if you're planning to rspec-test a line of code, you should not that line before you have the rspec test
Lohhari: *so if...
demoniszcze: so whenever I need to add code to controllers/models I should write rspec for it first (red), then write the code itself (green), then refactor
Lohhari: yes
Lohhari: but sometimes you're not going to write an rspec test, for instance when you're defining the view
Lohhari: then it's ok to just have a cucumber test red first, then turn it green
Lohhari: and in practice of course nobody follows the rules so religiously. it's just good to try it at least once during the course
demoniszcze: Ok, then. Time to code!
 
1 hour later…
11:52
demoniszcze: damn it.
12:05
demoniszcze: Dang, I'm stuck with the second scenario of HW4
demoniszcze: I'd like it do go to a route like /movies/:director
demoniszcze: but I can't just pass @movie.director to path helpers
Emilio-GT: hi
Emilio-GT: I have 82.35%% coverage in controllers. How can I get to 100%??
Emilio-GT: Almost all my controller file is in red
Lohhari: demoniszcze: so :director would contain the name of the director?
demoniszcze: Lohhari: yeah
Lohhari: /movies/director/:director would make more sense to me. /movies/:something means a single movie
Lohhari: Emilio-GT: i added some cucumber tests that perform sorting
Emilio-GT: you mean the ones from hw3??
Lohhari: yes
Emilio-GT: ahhhh...that makes sense Ill try it
demoniszcze: Lohhari: thanks
12:35
Emilio-GT: Lohhari: thanks, taht solved it
demoniszcze: Lohhari: Should same_director view have all the functionality that index view has (sorting, session etc.)?
Lohhari: that's how i made it but i don't think it's specified anywhere
demoniszcze: I see
demoniszcze: So you somehow redirected to index action but with different @movies?
Lohhari: i just copied most of the contents of the haml file
Lohhari: to a new view
Lohhari: that i think the test does specify: you have to create a dedicated view for it
demoniszcze: But then you have almost identical views, which is kinda moist
demoniszcze: especially since you have to reimplement most of the movies#index in same_director#index
demoniszcze: the session, highlighting, filtering logic
Lohhari: that is certainly true. perhaps haml allows you to create library-like chunks that you can import to different files. i haven't tried
13:30
demoniszcze: Ah, screw it. I don't know how to do it
13:48
blackratdog__: interesting observations from a php site about TDD phpclasses.org/blog/post/…
14:18
bbuk_: I have taken the highlighting, filtering etc out for the new view, there is no need
14:34
blackratdog__: and from the other side of the fence, a new Rails testing book :-p pragprog.com/book/nrtest2/rails-4-test-prescriptions
aakhedr: I need urgent assistance with libv8 - for 2 days now I cannot resolve this neither on my mac nor on the VM
aakhedr: if anyone can help? Pls see this edx-cs169-1x.stackexchange.com/questions/2585/…
blackratdog__: aakhedr, you could try #rubyonrails channel on irc.freenode.net to see if anyone can help you there
blackratdog__: i'm sure they must have seen this error a thousand times before
demoniszcze: blackratdog__: cool article you found there. I can already relate :D)
blackratdog__: hehe demoniszcze , I know how you feel :-)
demoniszcze: Testing first really is the hard part
demoniszcze: I've been staring at blank screen for 15 minutes now, yet no serendipity struck me
demoniszcze: Oh, I even used the wrong word - enlightenment, not serendipity
15:13
What is this chat about?
Stevos: Hey guys. Am still hacking away at HW3. The code I use for counting the rows in a table seems to have some kind of off-by-one error.
Stevos: Am wondering if may be it also counts the table header?
NamTaf: screw testing for that stupid oddness line
NamTaf: why would you even want it
NamTaf: screw it i'll finish the coverage tomorrow
NamTaf: it won't take long to implement most tests
NamTaf: oh wait it's only controllers and models, not helpers
NamTaf: sweet
NamTaf: i can do that tomrorow easy
NamTaf: peace out~~
15:38
demoniszcze: peace1
demoniszcze: hm should I add another action to movies controller that handles no director info or is it possible to do it inside the same_director action?
migane: inside the same method, just test director
demoniszcze: hm
demoniszcze: but for the movies that don't have director the show action fails - it complains about not having a proper route
demoniszcze: my link_to links to /movies/director/:director
demoniszcze: and if it's nil it's just /movies/director - there is no route for it
migane: your route does not seem right.
demoniszcze: I'm not sure how it should look :(
migane: check what is written in routes.rb as comments where the match is explained
migane: use exactly the same form
demoniszcze: i did, it's syntactically correct
demoniszcze: match 'movies/director/:director', to: 'movies#same_director', as: :same_director, via: :get
demoniszcze: it works with movies that have a director
demoniszcze: the problem occurs with movies that don't have it - the show view can't be rendered because link_to links to same_director_path(@movie.director)
Stevos: Never mind the table rows counr question I posted earlier. I'd made a mistake in my CSS selector. Got it now.
demoniszcze: @movie.director here is nil => /movies/director so it matches the regular /movies/:id route which fails -> can't find a movie with id = director
phamh9090_: I think the movie all have director (empty string), maybe your dbase is not updated to include director.
migane: exactly why I suggest to mimic what is explained in routes
demoniszcze: phamh : yeah, it's nil by default, I can make it use empty string but I don't think it will help with routing issue
migane: the problem is that somehow you should be able to get at the movie, and one way to do it securely is to use its id, which surely exists because you come from the show page.
demoniszcze: migane: I don't understand how my route differs from the example given
demoniszcze: apart from new syntax with colons that is
migane: in routes the example for match is (from memory): match /products/:id/catalog ...
demoniszcze: match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
migane: so adapt this to movies and director
demoniszcze: so the idea here is that my route should look like this: match 'movies/:id/director/:director' => 'movies#same_director', :as => :same_director
demoniszcze: ?
migane: why two director?
demoniszcze: Oh
demoniszcze: I think I'm still a long way from getting what a 'beautiful and restufl' URIs are
migane: the important thing here is to you begin with and are willing to continue, the remainder is just anecdotic
demoniszcze: well said
demoniszcze: Indeed, you have a way with words
migane: Well, I have so much pain in rails at the beginning, when it came out, and I did not forget it.
00:00 - 16:0016:00 - 00:00

« first day (50 days earlier)      last day (1086 days later) »