|
You are here |
fractaledmind.github.io | ||
| | | | |
www.zombiezen.com
|
|
| | | | | Interacting with SQLite inside Visual Studio Code | |
| | | | |
thomascountz.com
|
|
| | | | | SQL Injection Vulnerability | |
| | | | |
smsohan.com
|
|
| | | | | I am working on ScrumPad chat refactoring now. In rails 2, the named_scope feature works really great for ActiveRecord models. Lets start with the code first- The Source Code: class ChatUser < ActiveRecord::Base belongs_to :chat belongs_to :user belongs_to :chat_status, :foreign_key => "status_id" named_scope :closed, lambda {|chat_id| {:conditions => ["status_id = #{ChatStatus::CLOSED} AND chat_id = ? ", chat_id]}} do def invite() each { |chat_user| chat_user.update_attribute(:status_id, ChatStatus::INVITED) } end end named_scope :active_chats, lambda {|user_id| {:conditions => [" | |
| | | | |
yasoob.me
|
|
| | | Hi there folks! Recently I was doing a task for fossasia which required me to make a Django web app which allowed users to submit their email addresses and receive a welcome email in return. I was able to complete the project in a couple of hours. Most of the time was spent in making the UI look good. I am going to show you how you can easily make a similar app. | ||