凤凰城有没有办法只生成控制器,没有模型?

时间:2016-08-06 09:22:04

标签: ruby-on-rails elixir phoenix-framework

凤凰城有没有办法只生成控制器,没有模型?在轨道中,我可以通过

来做到这一点
public class GameMain extends Game {
    @Override
        public void dispose(){
            super.dispose();
            Assets.dispose();
   }
}

2 个答案:

答案 0 :(得分:3)

根据1.2版,nope还没有直接混音任务。查看了文档https://hexdocs.pm/phoenix/Phoenix.html

虽然您可以使用@michalmuskala所述的另一种方式使用

mix phoenix.gen.html --no-model

答案 1 :(得分:3)

您可以使用 [_myTableView setTableHeaderView:_viewWithMapView]; class Node(): def __init__(self,initdata): self.d = initdata self.next = None def setData(self,newdata): self.d = newdata def setNext(self,newnext): self.next = newnext def getData(self): return self.d def getNext(self): return self.next class LinkList(): def __init__(self): self.head = None def reverse(self): current = self.head >>> set current to head(start of node) previous = None >>> no node at previous while current !=None: >>> While current node is not null, loop nextt = current.getNext() >>> create a pointing var to next node(will use later) current.setNext(previous) >>> current node(or head node for first time loop) is set to previous(ie NULL), now we are breaking the link of the first node to second node, this is where nextt helps(coz we have pointer to next node for looping) previous = current >>> just move previous(which was pointing to NULL to current node) current = nextt >>> just move current(which was pointing to head to next node) self.head = previous >>> after looping is done, (move the head to not current coz current has moved to next), move the head to previous which is the last node. 选项来跳过模型和迁移,从而有效地获取控制器。