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
| class Role < ActiveRecord::Base | |
| has_many :users | |
| end | |
| class User < ActiveRecord::Base | |
| belongs_to :role | |
| 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
| <%= form_tag search_path, method: :get do %> | |
| <%= text_field_tag :q, nil %> | |
| <% 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
| class Answer < ActiveRecord::Base | |
| attr_accessor :array_response | |
| def initialize | |
| self.array_response = [] | |
| 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
| 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]) |
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
| <%= 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 %> |
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
| 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 |
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
| class Article < ActiveRecord::Base | |
| has_attached_file :cover, styles: { medium: "1280x720", thumb: "800x600" } | |
| validates_attachment_content_type :cover, content_type: /\Aimage\/.*\Z/ | |
| 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
| <%= 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 %> |
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
| <%= f.label :name, 'Nombre de la Plantilla' %> | |
| <%= f.text_field :name, class: 'form-control' %> | |
| <%= f.submit class: 'btn btn-success' %> |
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
| gem 'ffaker', '~> 2.1.0' |