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
import React, { Component } from 'react'; | |
import { Text, AppRegistry, View } from 'react-native'; | |
import axios from 'axios'; | |
const App = () => { | |
return ( | |
<View> | |
<Header headerText={"Albums"} /> | |
<AlbumList /> | |
</View> |
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
import random | |
import sys | |
import unittest | |
def gen_rand_curly_brackets_expression(length): | |
expression = [] | |
stack = [] | |
first = True | |
while length > 0: | |
if len(stack) == 0: | |
first = True |
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 KbArticle < ActiveRecord::Base | |
unloadable | |
scope :visible, lambda {{ :include => :category }} | |
self.table_name = "kb_articles" | |
validates_presence_of :title, :category | |
validates_presence_of :category_id | |
belongs_to :project # XXX association added to allow searching to work | |
belongs_to :category, :class_name => "KbCategory" |
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
diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb | |
index 6bae37b..8057da6 100644 | |
--- a/app/controllers/articles_controller.rb | |
+++ b/app/controllers/articles_controller.rb | |
@@ -83,7 +83,7 @@ class ArticlesController < KnowledgebaseController | |
end | |
def tagged | |
- @tag = params[:id] | |
+ @tag = params[:article_id] || params[:id] |