This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
int main() { | |
int i; | |
int x; | |
cout << "Ingrese un valor: "; | |
cin >> i; |
This file contains hidden or 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
# http://stevesohcot.com/tech-lessons-learned/2016/05/11/rails-create-admin-namespace | |
# /app/controllers/admin/base_controller.rb | |
class Admin::BaseController < ApplicationController | |
before_action :admin_only | |
layout "admin" | |
private |
This file contains hidden or 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
item = [] | |
flag = false | |
MaintenanceServiceRequest.where(car_id: self.maintenance_service_request.car_id).order(created_at: "desc").drop(1).each do |msr| | |
msr.maintenance_service_request_items.each do |i| | |
if i.maintenance_service_id == self.maintenance_service_id | |
item = i | |
flag = true | |
break | |
end | |
end |
This file contains hidden or 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
module ApplicationHelper | |
def resource | |
@resource ||= User.new | |
end | |
def resource_name | |
:user | |
end |
NewerOlder