tag:blogger.com,1999:blog-3941467493795628326.comments2014-07-22T05:44:27.081-07:00Linux Fireballtekewinhttp://www.blogger.com/profile/10230830520110635922noreply@blogger.comBlogger13125tag:blogger.com,1999:blog-3941467493795628326.post-36651367435373521542014-07-22T05:44:27.081-07:002014-07-22T05:44:27.081-07:00Diana,
Glad it helped solve the problem.Diana,<br /><br />Glad it helped solve the problem.tekewinhttps://www.blogger.com/profile/10230830520110635922noreply@blogger.comtag:blogger.com,1999:blog-3941467493795628326.post-68166476786846611162014-07-22T03:41:08.206-07:002014-07-22T03:41:08.206-07:00It really helped me. Thank you so much for this up...It really helped me. Thank you so much for this update as I finally managed to solve my problem with this :) Thanks!Artemiskahttps://www.blogger.com/profile/09754357952590058723noreply@blogger.comtag:blogger.com,1999:blog-3941467493795628326.post-35695855814357148862012-12-11T16:48:49.189-08:002012-12-11T16:48:49.189-08:00Rich,
Glad you got it working. Rails will always ...Rich,<br /><br />Glad you got it working. Rails will always look for a template when rendering something, whether the template is .erb, .haml, .js, etc. I try to document things that are not obvious to me so I can come back and reference them later, too!tekewinhttps://www.blogger.com/profile/10230830520110635922noreply@blogger.comtag:blogger.com,1999:blog-3941467493795628326.post-28922388548791766222012-12-11T16:08:31.782-08:002012-12-11T16:08:31.782-08:00You know what? That route started working for me w...You know what? That route started working for me when I removed some cruft from my routes.rb! <br /><br />Thanks again. This got me started with AJAX. I really appreciate posts that have the minimum_required_code_plus_explanations. Great job.icltlfatpplhttps://www.blogger.com/profile/00269513857111909714noreply@blogger.comtag:blogger.com,1999:blog-3941467493795628326.post-85622327979986314542012-12-11T13:35:12.156-08:002012-12-11T13:35:12.156-08:00It worked just fine when I re-used the index metho...It worked just fine when I re-used the index method as the action and had the index method generate @testdata.<br /><br />When I tried setting the action, as you did, to testajax, and adding a route for that:<br /><br />get '/home/testajax', to: 'home#testajax'<br /><br />I kept getting:<br /><br />Missing template home/testajax, application/testajax<br /><br />After trying to add a variety of probably incorrect templates it felt like a rathole. <br /><br />Is there something you do to tell Rails NOT to look for a template?<br /><br /><br />icltlfatpplhttps://www.blogger.com/profile/00269513857111909714noreply@blogger.comtag:blogger.com,1999:blog-3941467493795628326.post-39564855978587484272012-12-11T13:18:45.266-08:002012-12-11T13:18:45.266-08:00Rich,
In Rails 3, I always add new methods to rou...Rich,<br /><br />In Rails 3, I always add new methods to routes.rb so Rails knows specifically where to locate it. However, it might work without a routes.rb entry if the method is in the same controller associated with the view. I'm not sure without running a test.tekewinhttps://www.blogger.com/profile/10230830520110635922noreply@blogger.comtag:blogger.com,1999:blog-3941467493795628326.post-38032751696155262622012-12-11T12:47:58.528-08:002012-12-11T12:47:58.528-08:00Great post. Do you have to make the rails 3 route...Great post. Do you have to make the rails 3 routes.rb to make testajax a viable route?icltlfatpplhttps://www.blogger.com/profile/00269513857111909714noreply@blogger.comtag:blogger.com,1999:blog-3941467493795628326.post-28668800291336768012012-11-08T09:39:56.265-08:002012-11-08T09:39:56.265-08:00Benxamin,
I'm not sure where to find a compre...Benxamin,<br /><br />I'm not sure where to find a comprehensive list of all scaffold types, but I don't think there is one for a file upload field. There is a rails form helper for file upload documented here:<br /><br />http://guides.rubyonrails.org/form_helpers.html#uploading-files<br />tekewinhttps://www.blogger.com/profile/10230830520110635922noreply@blogger.comtag:blogger.com,1999:blog-3941467493795628326.post-32108505160703728112012-11-08T05:42:38.487-08:002012-11-08T05:42:38.487-08:00Awesome! This is exactly what I was looking for.
...Awesome! This is exactly what I was looking for. <br /><br />1. Where do you find a comprehensive list for Rails 3?<br />I tried running "rails g scaffold" but it still doesn't list all the types. <br /><br />2. Can scaffold generate a file upload field? I've tried :file, but it doesn't work. What would I use for that?Benxaminhttps://www.blogger.com/profile/11046730030247583591noreply@blogger.comtag:blogger.com,1999:blog-3941467493795628326.post-60073521193472481362012-07-09T08:30:37.745-07:002012-07-09T08:30:37.745-07:00vijay,
I always have to reference something when ...vijay,<br /><br />I always have to reference something when I am doing something odd, like day of the month jobs, etc.<br /><br />Bonus tip, when cron jobs start, they don't get a full shell environment so you can't rely on the $PATH being there. For that reason, it is always a good idea to put the full path to all programs and files in the command, or if you are running a script, set the environment variables in the script.<br /><br />Keithtekewinhttps://www.blogger.com/profile/10230830520110635922noreply@blogger.comtag:blogger.com,1999:blog-3941467493795628326.post-51946734979564708212012-07-09T08:18:56.667-07:002012-07-09T08:18:56.667-07:00Thanks for sharing the article. You can find more ...Thanks for sharing the article. You can find more examples about crontab at <a href="http://www.folkstalk.com/2012/07/add-job-to-cron-crontab-command.html" rel="nofollow">crontab command examples in unix</a>vijayhttps://www.blogger.com/profile/12220977541039397740noreply@blogger.comtag:blogger.com,1999:blog-3941467493795628326.post-41241861102142159712012-07-02T12:01:27.935-07:002012-07-02T12:01:27.935-07:00VeGeek,
It still works in rail 3.0. I've use...VeGeek,<br /><br />It still works in rail 3.0. I've used it recently with rails 3.0.3. <br /><br />Keithtekewinhttps://www.blogger.com/profile/10230830520110635922noreply@blogger.comtag:blogger.com,1999:blog-3941467493795628326.post-36019499946484356512012-07-02T06:43:01.574-07:002012-07-02T06:43:01.574-07:00ruby script/rails generate scaffold Modelname name...ruby script/rails generate scaffold Modelname name:string title:string employed_on:date remarks:text<br />it is rails2Anonymousnoreply@blogger.com