Skip to content

Instantly share code, notes, and snippets.

View Frank004's full-sized avatar

francisco Quinones Frank004

  • HB Quality Ware
  • Puerto Rico
View GitHub Profile
class Role < ActiveRecord::Base
has_many :users
end
class User < ActiveRecord::Base
belongs_to :role
end
<%= form_tag search_path, method: :get do %>
<%= text_field_tag :q, nil %>
<% end %>
class Answer < ActiveRecord::Base
attr_accessor :array_response
def initialize
self.array_response = []
end
end
class SurveyTransController < ApplicationController
skip_before_filter :authenticate_user!
layout "survey"
def survey
end
def password_confirmation
# if params[:password_confirmation].present? && params[:survey_id].present?
@survey = Survey.find_by_id(params[:survey_id])
<%= form_tag({controller: "survey_trans", action: "password_confirmation"}, {method: :get}) do |f| %>
<%= text_field_tag :password_confirmation, params[:password_confirmation], class: "form-control", placeholder: "password" %>
<% end %>
gem install nokogiri -- --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/libxml2 --use-system-libraries
class Article < ActiveRecord::Base
has_attached_file :cover, styles: { medium: "1280x720", thumb: "800x600" }
validates_attachment_content_type :cover, content_type: /\Aimage\/.*\Z/
end
<%= form_for([@project, @survey], :html => { :class => 'form' })do |f| %>
<%= f.collection_select :survey_builder_id, SurveyBuilder.all, :id, :name, :include_blank => "Seleccione Plantilla"},class: 'select2'%>
<%= f.submit class: 'btn btn-success' %>
<% end %>
<%= f.label :name, 'Nombre de la Plantilla' %>
<%= f.text_field :name, class: 'form-control' %>
<%= f.submit class: 'btn btn-success' %>
gem 'ffaker', '~> 2.1.0'