This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
components/ | |
my_bounded_context/ | |
app/ | |
presentation/ | |
assets/ | |
helpers/ | |
mailers/ | |
views/ | |
drops/ | |
filters/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) PublishedValidator | |
- published_at needs to be present | |
2) InstantlyBookableValidator | |
- rental needs to be instantly bookable | |
3) PhotosValidator | |
- minimal photo size is 7 | |
4) StateValidator | |
for rentals from US we need state present | |
5) DescriptionValidator | |
- needs to be longer then 50 characters, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FormObject::PublishedPost | |
include ActiveModel::Model | |
include ActiveModel::Validations | |
delegate :category_id, :tag_list, to: :post | |
delegate :category_id=, :tag_list=, to: :post | |
attr_accessor :post | |
validates :category_id, :tag_list, presence: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Rcntec::Ams::Searcher::BaseSeacher | |
#FIXME Название обязательно должно кончаться на название класса, для которого идет посик | |
class << self | |
def clean_query(query) | |
query = query.to_s.strip | |
query = query.gsub(/\s+/, " ") | |
query = query.gsub(/-/, " ") | |
query = ":" if query.length.zero? | |
"*#{query}*" | |
end |