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.input :date_today, :collection => [['2 dager siden', Date.today-2], ['I går', Date.yesterday], ['I dag', Date.today.day]], :as :radio_buttons %> |
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
def index | |
@admin = Admin.all | |
end | |
def new | |
@admin = Admin.new | |
end | |
def destroy | |
@admin.destroy |
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 Project < ActiveRecord::Base | |
# Sjekker at kolonnen navn er fyllt ut. | |
validates :name, presence: true | |
validates :client_id, presence: true | |
belongs_to :admin | |
belongs_to :client | |
has_many :registerhours, dependent: :destroy | |
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
<script type="text/javascript"> | |
$(document).ready(function () { | |
$("#project_postnumber").blur(function(){ | |
$.ajax({url: '/project/postplace', type: 'POST'}) | |
.done(function(response){ | |
$("#project_postplace").val(response); | |
}); | |
}); | |
}); | |
</script> |
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 ApplicationController < ActionController::Base | |
# Prevent CSRF attacks by raising an exception. | |
# For APIs, you may want to use :null_session instead. | |
protect_from_forgery with: :exception | |
before_filter :authenticate_admin! | |
default_scope { where(company_id = current_admin.company_id ) } | |
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
2013-06-06 10:25:33 [124601/timer] info: signal 11 caught - shutting down | |
2013-06-06 10:25:33 [124535/watcher] error: worker process exited with 3 - restarting | |
2013-06-06 10:25:33 [124603/main] always: New Relic local daemon version 1.2.0.257/C+IA started - pid=124603 background=true SSL=false host=gyda.norisp.no | |
2013-06-06 10:25:34 [124603/main] info: RPM redirect: collector-0.newrelic.com(204.93.223.134) port 0 (0 means default port) | |
2013-06-06 10:25:34 [124603/timer] error: segmentation violation - stack dump follows .../usr/sbin/nrsysmond[0x404abc] | |
/lib64/libpthread.so.0[0x3bb0a0f500] | |
/usr/sbin/nrsysmond[0x536fc4] | |
/usr/sbin/nrsysmond[0x5374fb] | |
/usr/sbin/nrsysmond[0x40fe71] | |
/usr/sbin/nrsysmond[0x410e06] |
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
<?xml version="1.0" encoding="utf-8"?> | |
<extension type="module" version="3" client="site" method="upgrade"> | |
<name>SM360 Footer</name> | |
<author>Thomas Stroemme</author> | |
<authorEmail>[email protected]</authorEmail> | |
<authorUrl>http://sm360.no</authorUrl> | |
<copyright>SenseMedia 2013</copyright> | |
<license>GNU/GPL v2</license> | |
<version>1.0.0</version> | |
<description>Footer for SenseMedia website</description> |
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
2013-05-30 10:02:19 [381321/timer] info: signal 11 caught - shutting down | |
2013-05-30 10:02:19 [381223/watcher] error: worker process exited with 3 - restarting | |
2013-05-30 10:02:19 [381329/main] always: New Relic local daemon version 1.2.0.257/C+IA started - pid=381329 background=true SSL=false host=gyda.norisp.no | |
2013-05-30 10:02:19 [381329/main] info: RPM redirect: collector-0.newrelic.com(204.93.223.134) port 0 (0 means default port) | |
2013-05-30 10:02:19 [381329/timer] error: segmentation violation - stack dump follows .../usr/sbin/nrsysmond[0x404abc] | |
/lib64/libpthread.so.0[0x3bb0a0f500] | |
/usr/sbin/nrsysmond[0x536fc4] | |
/usr/sbin/nrsysmond[0x5374fb] | |
/usr/sbin/nrsysmond[0x40fe71] | |
/usr/sbin/nrsysmond[0x410e06] |
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
Started POST "/projects" for 127.0.0.1 at 2013-05-25 15:24:16 +0200 | |
Processing by ProjectController#create as HTML | |
Parameters: {"utf8"=>"✓", "authenticity_token"=>"jaXD4d7Qg+seIiSlbqcm9bF6m7lJ+GsYkGkDVPgM40M=", "project"=>{"project_name"=>"Thomas", "project_pass"=>"928irte"}, "commit"=>"Lag"} | |
Rendered project/new.html.erb within layouts/application (2.6ms) | |
Rendered layouts/_messages.html.erb (0.1ms) | |
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1[0m | |
Rendered layouts/_menu.html.erb (3.1ms) | |
Rendered layouts/_footer.html.erb (0.3ms) | |
Completed 200 OK in 99ms (Views: 97.4ms | ActiveRecord: 0.3ms) |
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
<%= simple_form_for(@del_project, url: :del_project ) do |f| %> | |
<%#= f.error_notification %> | |
<div class="form-inputs"> | |
<%= f.input :delete_project, collection: Project.list_domains.split("\n"), prompt: "Velg utviklingssted" %> | |
<%#= f.input %> | |
<%= f.button :submit, "Slett", class: "btn btn-danger" %> | |
</div> | |
<% end %> |