sobota, 27 sierpnia 2011
WTF is mocha?
mocha:
https://github.com/floehopper/mocha
http://agilewebdevelopment.com/plugins/mocha
http://www.ibm.com/developerworks/web/library/wa-mockrails/index.html
http://www.ibm.com/developerworks/web/library/wa-rspec/index.html
http://yarorb.wordpress.com/2007/11/26/mocks-and-stubs-in-ruby-on-rails-the-mocha-solution/
https://github.com/floehopper/mocha
http://agilewebdevelopment.com/plugins/mocha
http://www.ibm.com/developerworks/web/library/wa-mockrails/index.html
http://www.ibm.com/developerworks/web/library/wa-rspec/index.html
http://yarorb.wordpress.com/2007/11/26/mocks-and-stubs-in-ruby-on-rails-the-mocha-solution/
Files
file uploading:
http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm
in pdf
http://railscasts.com/episodes/134-paperclip?autoplay=true
https://github.com/thoughtbot/paperclip
Encripting files:
http://onehub.com/blog/posts/encrypting-your-files-with-rails-part-i-2/
http://onehub.com/blog/posts/encrypting-your-files-with-rails-part-ii/
Hirb, to see nicer tables in irb (rails c)
You have to add gem 'hirb' in the gemfile
https://github.com/cldwalker/hirb
http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm
in pdf
http://railscasts.com/episodes/134-paperclip?autoplay=true
https://github.com/thoughtbot/paperclip
Encripting files:
http://onehub.com/blog/posts/encrypting-your-files-with-rails-part-i-2/
http://onehub.com/blog/posts/encrypting-your-files-with-rails-part-ii/
Hirb, to see nicer tables in irb (rails c)
You have to add gem 'hirb' in the gemfile
https://github.com/cldwalker/hirb
środa, 24 sierpnia 2011
unit testing and inheritance
In my project I have Single Table Inheritance (STI). Example of STI. type:string is very important!!!
I came across an error while I tried the unit testing:
Problem:
I came across an error while I tried the unit testing:
Problem:
test_the_truth(AdminTest):
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: clients: DELETE FROM "clients" WHERE 1=1
Solution1:
delete the fixtures of chlid models, in this case table 'clients'
Solution2:
add name of the fixtures one want to add in each test:
fixtures :clients
and delete line
fixtures :all
from the test_helper.rb
Solution2:
add name of the fixtures one want to add in each test:
fixtures :clients
and delete line
fixtures :all
from the test_helper.rb
binding.pry
Best screencasts about rails: http://railscasts.com
The last episode was about pry. Nice alternative to irb.
http://pry.github.com/
How to change your editor in pry? Let's do this in Ubuntu and switch from nano to vim
Just make/add to a file named '.pryrc' in your home folder
pry -r config/environment
The last episode was about pry. Nice alternative to irb.
http://pry.github.com/
How to change your editor in pry? Let's do this in Ubuntu and switch from nano to vim
Just make/add to a file named '.pryrc' in your home folder
pry -r config/environment
wtorek, 23 sierpnia 2011
poniedziałek, 22 sierpnia 2011
Hello World!
best introduction to rails:
http://pragprog.com/book/rails4/agile-web-development-with-rails
VIM:
http://net.tutsplus.com/sessions/vim-essential-plugins/
copy paste http://superuser.com/questions/10588/how-to-make-cut-copy-paste-in-gvim-on-ubuntu-work-with-ctrlx-ctrlc-ctrlv
http://templates.arcsin.se/demo/shades-of-gray-website-template/
http://www.templatesperfect.com/business/free-corporate-business-web-template-corporate-perfect/
http://sixrevisions.com/demo/dark_and_sleek_layout/index.html
http://css-tricks.com/264-how-to-steal-a-websites-background-image/
http://www.opendesigns.org/design/blacksilver/
http://www.opendesigns.org/design/sky-is-the-limit/
http://www.opendesigns.org/design/keep-it-simple/
http://www.opendesigns.org/design/greensteps/
http://www.opendesigns.org/design/clean/
http://www.opendesigns.org/design/yellow-business/
http://www.opendesigns.org/design/clean-and-simpl/
grafika:
www.gettyimages.pl
http://www.freephotosbank.com
http://www.sxc.hu
http://www.shutterstock.com/
http://www.freephotosbank.com/10431.html
Subskrybuj:
Posty (Atom)