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 delete_categories | |
CategoryPost.all(:post_id => self.id).destroy! | |
end | |
before :destroy, :delete_categories |
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
~ SELECT "id", "permalink", "title", "template", "site_id" FROM "pages" WHERE ("site_id" IN (4, 10, 1, 7, 6, 3, 9, 2, 8, 5)) ORDER BY "id" | |
~ SELECT COUNT(*) FROM "pages" WHERE ("site_id" = 1) | |
~ SELECT COUNT(*) FROM "pages" WHERE ("site_id" = 2) | |
~ SELECT COUNT(*) FROM "pages" WHERE ("site_id" = 3) | |
~ SELECT COUNT(*) FROM "pages" WHERE ("site_id" = 4) | |
~ SELECT COUNT(*) FROM "pages" WHERE ("site_id" = 5) | |
~ SELECT COUNT(*) FROM "pages" WHERE ("site_id" = 6) | |
~ SELECT COUNT(*) FROM "pages" WHERE ("site_id" = 7) | |
~ SELECT COUNT(*) FROM "pages" WHERE ("site_id" = 8) | |
~ SELECT COUNT(*) FROM "pages" WHERE ("site_id" = 9) |
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
<?php | |
class Form extends Validation { | |
private $action; | |
private $method; | |
private $name; | |
private $validation; | |
private $vMessage; | |
public $request = array(); | |
public $inputs = array(); |
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
public static function run(){ | |
global $_lang; | |
p(self::$request); | |
switch (self::$request[0]){ | |
default: | |
break; | |
case $_lang['register']: |
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
foo bar baz | |
sdfsdf | |
sdfsdf |
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
require "iconv" | |
class String | |
def to_p | |
Iconv.iconv('ascii//translit//IGNORE', 'utf-8', self).first.gsub("'", '').gsub(/[^a-zA-Z0-9-]+/, '-').gsub(/^-/, '').gsub(/-$/, '') | |
end | |
end | |
puts "asd asd $ asd".to_p | |
puts "zażĻ=ółć".to_p |
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
require "iconv" | |
class String | |
def to_p | |
Iconv.iconv('ascii//translit//IGNORE', 'utf-8', self).first.gsub("'", '').gsub(/[^a-zA-Z0-9-]+/, '-').gsub(/^-/, '').gsub(/-$/, '') | |
end | |
end | |
puts "asd asd $ asd".to_p | |
puts "zażĻ=ółć".to_p |
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
require "iconv" | |
class String | |
def to_p | |
Iconv.iconv('ascii//translit//IGNORE', 'utf-8', self).first.gsub("'", '').gsub(/[^a-zA-Z0-9-]+/, '-').gsub(/^-/, '').gsub(/-$/, '') | |
end | |
end | |
puts "asd asd $ asd".to_p | |
puts "zażĻ=ółć".to_p |
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
require "iconv" | |
class String | |
def to_p | |
Iconv.iconv('ascii//translit//IGNORE', 'utf-8', self).first.gsub("'", '').gsub(/[^a-zA-Z0-9-]+/, '-').gsub(/^-/, '').gsub(/-$/, '') | |
end | |
end | |
puts "asd asd $ asd".to_p | |
puts "zażĻ=ółć".to_p |
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
require "iconv" | |
class String | |
def to_p | |
Iconv.iconv('ascii//translit//IGNORE', 'utf-8', self).first.gsub("'", '').gsub(/[^a-zA-Z0-9-]+/, '-').gsub(/^-/, '').gsub(/-$/, '') | |
end | |
end | |
puts "asd asd $ asd".to_p | |
puts "zażĻ=ółć".to_p |