- Herşey bir
Object
(Nesne) - Her
Object
BasicObject
den türemiş. (Objective-C NSObject gibi...) Object.methods
ile o nesneye ait tüm method'larObject.methods.inspect
string olarak method'lar- Mutlaka bir şey geriye döner. Hiçbir şey dönmese
nil
döner.
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
#app/inputs/collection_check_boxes_input.rb | |
class CollectionCheckBoxesInput < SimpleForm::Inputs::CollectionCheckBoxesInput | |
def item_wrapper_class | |
"checkbox-inline" | |
end | |
end |
##Userable | |
module Userable | |
def self.included(base) | |
base.has_one :user, :as => :userable, :dependent => :destroy, :autosave => true | |
base.validate :user_must_be_valid | |
base.alias_method_chain :user, :autobuild | |
base.extend ClassMethods | |
base.define_user_accessors | |
end | |
# autoload concerns | |
module YourApp | |
class Application < Rails::Application | |
config.autoload_paths += %W( | |
#{config.root}/app/controllers/concerns | |
#{config.root}/app/models/concerns | |
) | |
end | |
end |
Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down
One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.
Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o