Skip to content

Instantly share code, notes, and snippets.

View rderoldan1's full-sized avatar
πŸ‡¨πŸ‡΄

Ruben Espinosa rderoldan1

πŸ‡¨πŸ‡΄
  • Medellin, Colombia
View GitHub Profile
@rderoldan1
rderoldan1 / gist:2210196
Created March 26, 2012 22:21
login error
response from explorer
Started POST "/sessions" for 190.71.163.74 at Mon Mar 26 22:19:48 +0000 2012
Processing by SessionsController#create as HTML
Parameters: {"commit"=>"Sign In", "session"=>{"email"=>"[email protected]", "password"=>"[FILTERED]"}, "authenticity_token"=>"nQWHaxlnvmGCC/3S75di5Yl6qRhgT/26ZGhbIUCGcEg=", "utf8"=>"βœ“"}
WARNING: Can't verify CSRF token authenticity
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."email" = '[email protected]' LIMIT 1
Redirected to http://ec2-107-22-95-239.compute-1.amazonaws.com/users/6
Completed 302 Found in 20ms
erb
<%= select_tag "option_select", options_from_collection_for_select(@colegios, "dane", "nombre"),:prompt => "SELECCIONE UN COLEGIO", :class => "option_select"%>
HTML
<select class="option_select" id="option_select" name="option_select"><option value="">SELECCIONE UN COLEGIO</option><option value="205001009916">CENT EDUC EL MANZANILLO</option>
<option value="205001002768">CENT EDUC EL SALADO</option>
<option value="205001006119">CENT EDUC JUAN ANDRES PATINO</option>
<option value="205001001966">CENT EDUC LA ALDEA</option>
@rderoldan1
rderoldan1 / README.markdown
Created February 21, 2012 01:32
admin way

The way to create an admin view

first you have the resource like this /users, but you like admin the resources in that way /admin/users.

rails g controller admin/users Then you get a file like this

`class Admin::UsersController < ApplicationController put your code here

@rderoldan1
rderoldan1 / gist:1648004
Last active November 25, 2015 19:43
errors that can appear when you try to install ruby gems

###This error can appear when you try to install ruby gems follow this steps:

###Error: no such file to load --zlib 1. sudo apt-get install zlib1g zlib1g-dev 2. cd /usr/src/ruby-1.9.2-p180/ext/zlib/ 3. sudo ruby extconf.rb 4. sudo make 5. sudo make install

@rderoldan1
rderoldan1 / database.yml
Created November 23, 2011 17:27
Multiple databases connection on Rails 3
config/database.yml
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
db: