This file contains 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
~/Desktop/twitterjm$ git push heroku master | |
Counting objects: 10, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (7/7), done. | |
Writing objects: 100% (7/7), 725 bytes, done. | |
Total 7 (delta 5), reused 0 (delta 0) | |
-----> Heroku receiving push | |
-----> Ruby/Rails app detected | |
-----> Installing dependencies using Bundler version 1.1.rc.7 |
This file contains 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
Server Error in '/' Application. | |
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. | |
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. | |
Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. | |
Source Error: | |
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL: |
This file contains 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
def fibonacci(n) | |
a = [1,1] | |
(n-2).times{ a[a.index(a.min)] = a[0]+a[1]} | |
a.max | |
end |
This file contains 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
def home | |
# get 'login', :to => 'devise/sessions#new' in my routes.rb | |
redirect_to 'login' unless current_user #if not logged in, kick him out of here! | |
end |
This file contains 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
<%= select_tag("objective[indicator_id]", options_for_select([["seleccione indicador",0]] + @indicators.map {|u| [u.name,u.id]}, selected = var_indicator ) , html_options = {:onchange => "this.form.elements['objective[criteria]'].value = this.form.elements['tmp_objective[indicator_id]'].options[ this.form.elements['objective[indicator_id]'].selectedIndex ].text "}) %> | |
<%= text_area_tag "objective[criteria]", var_criteria.to_s , :rows => 5, :cols => 70 %></td> | |
<div style="display:none;VISIBILITY:none;" > | |
<%= collection_select("tmp_objective", "indicator_id" , @indicators, "id", "suggested_criteria", options ={:prompt=>""}) %> | |
</div> |
This file contains 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
I recommend getting the 10.04 LTS version meanwhile, but if you feel "edgy" you can get the latest one (though I haven't tested how easy it is to install Ruby there) | |
OS: | |
http://www.ubuntu.com/download/ubuntu/download | |
RUBY and everything else using RVM: | |
http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/ | |
Firefox: 1st uninstall the default one (is not linked to the ones in the repositories -- easily done through Ubuntu Software Center) | |
then in the terminal => |
This file contains 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
<td>Project<br/ > | |
<%= f.select :project_id, Project.all.collect{|a| [a.name, a.id]}%></td> | |
# the idea would be to do something similar to what one can do with text_tag | |
<%= text_tag :comment, :size => 10 %> # which renders a text_input element,,, with 10 spaces for character input... | |
This file contains 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
# I want to go from the session information (which contains the current logged in user_id) to his/her assigned EvaluationUser, down to his'/hers EvaluationCategories, down to the objectives associated to those, and finally the evidences related to each one of them.... | |
#the idea is being able to obtain and array of ob_evidences that the user has created.... but the following does not seem to work even though I have the associations which should make everything run swiftly,,,, | |
def index | |
@ob_evidences = EvaluationUser.where("user_id = ?", session[:user_id]).first.evaluation_categories.objectives.ob_evidences | |
end |
This file contains 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
/* the idea here is to create a link with an image AND some text,,,, but ONLY the text gets underlined*/ | |
/* with this setup and CSS it is not possible to take out the underline of the img element (since it is an in-line element)*/ | |
<a href=#><img src="path/to/file" /> some text</a> | |
/* Because 'a' styling is supposed to have text-decoration:underline; and that affects the image too.... | |
even with: |
This file contains 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
en: | |
editing: "editing %{thingy}" | |
another: "User" | |
# the idea is that I can call a dict definition from within another one? | |
#maybe im better off doing something like this: | |
#in view | |
t 'editing', :thingy => t('another') |
NewerOlder