Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
after_update :create_new_task, if: :completed? def create_new_task self.class.create(title: 'Your new task', user_id: user_id) end
@array.in_groups_of((@array.size.to_f/2).ceil, false) do |array| end
before_update :change_status def change_status self.status = :testing if self.user.type.tester? end
scope "(:locale)", :defaults => {:locale => "ru"}, :locale => /(ru|en)/ do
= form_for(@order) do |f| = f.fields_for :purchaseds do |p| = debug p
<%= f.collection_select :category_id, Category.order(:name), :id, :name, class: 'span12' %>
Project.where(:category_id => params[:category_id])
Category.includes(:projects).find(params[:category_id])
https://api.facebook.com/method/links.getStats?urls=%%URL%%&format=json
[{"url":"URL","normalized_url":"URL","share_count":1,"like_count":0,"comment_count":0,"total_count":1,"click_count":0,"comments_fbid":id,"commentsbox_count":0}]