Search Results

Search found 4 results on 1 pages for 'phleet'.

Page 1/1 | 1 

  • Git push won't do anything (Everything up-to-date)

    - by phleet
    I'm trying to update a git repository on github. I made a bunch of changes, added them, committed then attempted to do a git push. The response tells me that everything is up to date, but clearly it's not. git remote show origin responds with the repository I'd expect. Why is git telling me the repository is up to date when there are local commits that aren't visible on the repository? [searchgraph] git status # On branch develop # Untracked files: # (use "git add <file>..." to include in what will be committed) # # Capfile # config/deploy.rb nothing added to commit but untracked files present (use "git add" to track) [searchgraph] git add . [searchgraph] git status # On branch develop # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # new file: Capfile # new file: config/deploy.rb # [searchgraph] git commit -m "Added Capistrano deployment" [develop 12e8af7] Added Capistrano deployment 2 files changed, 26 insertions(+), 0 deletions(-) create mode 100644 Capfile create mode 100644 config/deploy.rb [searchgraph] git push Everything up-to-date [searchgraph] git status # On branch develop nothing to commit (working directory clean)

    Read the article

  • Restricting Edit and Delete in Ruby on Rails

    - by phleet
    I want to be able to edit and delete resources myself, but not allow users of the application to do so. Is there an easy way of doing this in Rails? An incomplete solution would be just to remove the "delete" and "edit" buttons from the index view, but that doesn't disable their ability to do so via direct HTTP requests. Running Rails 2.2.2 and ruby 1.8.7

    Read the article

  • Restricting Edit and Delete

    - by phleet
    I want to be able to edit and delete resources myself, but not allow users of the application to do so. Is there an easy way of doing this in Rails? An incomplete solution would be just to remove the "delete" and "edit" buttons from the index view, but that doesn't disable their ability to do so via direct HTTP requests. Running Rails 2.2.2 and ruby 1.8.7

    Read the article

  • Updating cached counts in MySQL

    - by phleet
    In order to fix a bug, I have to iterate over all the rows in a table, updating a cached count of children to what its real value should be. The structure of the things in the table form a tree. In rails, the following does what I want: Thing.all.each do |th| Thing.connection.update( " UPDATE #{Thing.quoted_table_name} SET children_count = #{th.children.count} WHERE id = #{th.id} " ) end Is there any way of doing this in a single MySQL query? Alternatively, is there any way of doing this in multiple queries, but in pure MySQL? I want something like UPDATE table_name SET children_count = ( SELECT COUNT(*) FROM table_name AS tbl WHERE tbl.parent_id = table_name.id ) except the above doesn't work (I understand why it doesn't).

    Read the article

1